Skip to content

Commit

Permalink
issue SAML-Toolkits#51: set up Maven multi-module project
Browse files Browse the repository at this point in the history
this will allow compiling and releasing with one command from the
top-level directory.

* changed version to 2.0.0-SNAPSHOT as per Maven convention
* moved common settings into top-level pom.xml
* tweaked artifactId's to match the directory name
* use enforcer plugin to ensure we use the right JDK and Maven versions
  • Loading branch information
Luis Miranda committed Aug 9, 2016
1 parent 2ae2d03 commit 2e5bf96
Show file tree
Hide file tree
Showing 4 changed files with 138 additions and 76 deletions.
94 changes: 44 additions & 50 deletions core/pom.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.onelogin</groupId>
<artifactId>java-saml</artifactId>
<version>2.0.0</version>
<parent>
<groupId>com.onelogin</groupId>
<artifactId>java-saml-toolkit</artifactId>
<version>2.0.0-SNAPSHOT</version>
</parent>

<packaging>jar</packaging>
<name>Onelogin java-saml Toolkit</name>
<name>Onelogin java-saml Toolkit Core</name>
<artifactId>java-saml-tookit-core</artifactId>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -35,16 +39,16 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-javaagent</artifactId>
<version>1.6.0</version>
<scope>test</scope>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-javaagent</artifactId>
<version>1.6.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4-rule-agent</artifactId>
<version>1.6.4</version>
<scope>test</scope>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4-rule-agent</artifactId>
<version>1.6.4</version>
<scope>test</scope>
</dependency>

<!-- for log -->
Expand Down Expand Up @@ -87,41 +91,31 @@
</dependencies>

<build>
<finalName>java-saml-toolkit</finalName>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.6.201602180812</version>
<configuration>
<propertyName>jacoco.agent.argLine</propertyName>
</configuration>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<configuration>
<argLine>-XX:-UseSplitVerifier ${jacoco.agent.argLine}</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.6.201602180812</version>
<configuration>
<propertyName>jacoco.agent.argLine</propertyName>
</configuration>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<configuration>
<argLine>-XX:-UseSplitVerifier ${jacoco.agent.argLine}</argLine>
</configuration>
</plugin>
</plugins>
</build>
</project>
66 changes: 66 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.onelogin</groupId>
<artifactId>java-saml-toolkit</artifactId>
<version>2.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Onelogin java-saml Toolkit</name>

<properties>
<slf4jVersion>1.7.12</slf4jVersion>
<junitVersion>4.12</junitVersion>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<junitVersion>4.12</junitVersion>
<logbackVersion>1.1.3</logbackVersion>
<apacheCommonsLangVersion>3.4</apacheCommonsLangVersion>
</properties>

<modules>
<module>core</module>
<module>samples</module>
</modules>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.4.1</version>
<executions>
<execution>
<id>enforce-versions</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<fail>true</fail>
<rules>
<requireMavenVersion>
<version>3.3.9</version>
</requireMavenVersion>
<requireJavaVersion>
<version>1.7</version>
</requireJavaVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
36 changes: 10 additions & 26 deletions samples/java-saml-jspsample/pom.xml
Original file line number Diff line number Diff line change
@@ -1,38 +1,22 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.onelogin</groupId>
<artifactId>java-saml-jspsample</artifactId>
<packaging>war</packaging>
<version>2.0.0</version>
<name>Onelogin java-saml Sample Webapp</name>
<parent>
<groupId>com.onelogin</groupId>
<artifactId>java-saml-tookit-samples</artifactId>
<version>2.0.0-SNAPSHOT</version>
</parent>

<properties>
<jdk.version>1.7</jdk.version>
</properties>
<artifactId>java-saml-tookit-jspsample</artifactId>
<packaging>war</packaging>
<name>Onelogin java-saml Toolkit Sample Webapp</name>

<dependencies>
<dependency>
<groupId>com.onelogin</groupId>
<artifactId>java-saml</artifactId>
<version>2.0.0</version>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<finalName>java-saml-jspsample</finalName>
<!-- Set JDK Compiler Level -->
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>${jdk.version}</source>
<target>${jdk.version}</target>
</configuration>
</plugin>
</plugins>
</build>


</project>
18 changes: 18 additions & 0 deletions samples/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.onelogin</groupId>
<artifactId>java-saml-toolkit</artifactId>
<version>2.0.0-SNAPSHOT</version>
</parent>

<artifactId>java-saml-tookit-samples</artifactId>
<name>Onelogin java-saml Toolkit Samples</name>
<packaging>pom</packaging>

<modules>
<module>java-saml-jspsample</module>
</modules>

</project>

0 comments on commit 2e5bf96

Please sign in to comment.