Skip to content

Commit 2e5bf96

Browse files
author
Luis Miranda
committed
issue #51: set up Maven multi-module project
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
1 parent 2ae2d03 commit 2e5bf96

4 files changed

Lines changed: 138 additions & 76 deletions

File tree

core/pom.xml

Lines changed: 44 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
33
<modelVersion>4.0.0</modelVersion>
4-
<groupId>com.onelogin</groupId>
5-
<artifactId>java-saml</artifactId>
6-
<version>2.0.0</version>
4+
<parent>
5+
<groupId>com.onelogin</groupId>
6+
<artifactId>java-saml-toolkit</artifactId>
7+
<version>2.0.0-SNAPSHOT</version>
8+
</parent>
9+
710
<packaging>jar</packaging>
8-
<name>Onelogin java-saml Toolkit</name>
11+
<name>Onelogin java-saml Toolkit Core</name>
12+
<artifactId>java-saml-tookit-core</artifactId>
913

1014
<properties>
1115
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -35,16 +39,16 @@
3539
<scope>test</scope>
3640
</dependency>
3741
<dependency>
38-
<groupId>org.powermock</groupId>
39-
<artifactId>powermock-module-javaagent</artifactId>
40-
<version>1.6.0</version>
41-
<scope>test</scope>
42+
<groupId>org.powermock</groupId>
43+
<artifactId>powermock-module-javaagent</artifactId>
44+
<version>1.6.0</version>
45+
<scope>test</scope>
4246
</dependency>
4347
<dependency>
44-
<groupId>org.powermock</groupId>
45-
<artifactId>powermock-module-junit4-rule-agent</artifactId>
46-
<version>1.6.4</version>
47-
<scope>test</scope>
48+
<groupId>org.powermock</groupId>
49+
<artifactId>powermock-module-junit4-rule-agent</artifactId>
50+
<version>1.6.4</version>
51+
<scope>test</scope>
4852
</dependency>
4953

5054
<!-- for log -->
@@ -87,41 +91,31 @@
8791
</dependencies>
8892

8993
<build>
90-
<finalName>java-saml-toolkit</finalName>
91-
<plugins>
92-
<plugin>
93-
<groupId>org.jacoco</groupId>
94-
<artifactId>jacoco-maven-plugin</artifactId>
95-
<version>0.7.6.201602180812</version>
96-
<configuration>
97-
<propertyName>jacoco.agent.argLine</propertyName>
98-
</configuration>
99-
<executions>
100-
<execution>
101-
<id>prepare-agent</id>
102-
<goals>
103-
<goal>prepare-agent</goal>
104-
</goals>
105-
</execution>
106-
</executions>
107-
</plugin>
108-
<plugin>
109-
<groupId>org.apache.maven.plugins</groupId>
110-
<artifactId>maven-surefire-plugin</artifactId>
111-
<version>2.12</version>
112-
<configuration>
113-
<argLine>-XX:-UseSplitVerifier ${jacoco.agent.argLine}</argLine>
114-
</configuration>
115-
</plugin>
116-
<plugin>
117-
<groupId>org.apache.maven.plugins</groupId>
118-
<artifactId>maven-compiler-plugin</artifactId>
119-
<version>3.0</version>
120-
<configuration>
121-
<source>1.7</source>
122-
<target>1.7</target>
123-
</configuration>
124-
</plugin>
125-
</plugins>
126-
</build>
94+
<plugins>
95+
<plugin>
96+
<groupId>org.jacoco</groupId>
97+
<artifactId>jacoco-maven-plugin</artifactId>
98+
<version>0.7.6.201602180812</version>
99+
<configuration>
100+
<propertyName>jacoco.agent.argLine</propertyName>
101+
</configuration>
102+
<executions>
103+
<execution>
104+
<id>prepare-agent</id>
105+
<goals>
106+
<goal>prepare-agent</goal>
107+
</goals>
108+
</execution>
109+
</executions>
110+
</plugin>
111+
<plugin>
112+
<groupId>org.apache.maven.plugins</groupId>
113+
<artifactId>maven-surefire-plugin</artifactId>
114+
<version>2.12</version>
115+
<configuration>
116+
<argLine>-XX:-UseSplitVerifier ${jacoco.agent.argLine}</argLine>
117+
</configuration>
118+
</plugin>
119+
</plugins>
120+
</build>
127121
</project>

pom.xml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
5+
<groupId>com.onelogin</groupId>
6+
<artifactId>java-saml-toolkit</artifactId>
7+
<version>2.0.0-SNAPSHOT</version>
8+
<packaging>pom</packaging>
9+
<name>Onelogin java-saml Toolkit</name>
10+
11+
<properties>
12+
<slf4jVersion>1.7.12</slf4jVersion>
13+
<junitVersion>4.12</junitVersion>
14+
15+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
16+
<junitVersion>4.12</junitVersion>
17+
<logbackVersion>1.1.3</logbackVersion>
18+
<apacheCommonsLangVersion>3.4</apacheCommonsLangVersion>
19+
</properties>
20+
21+
<modules>
22+
<module>core</module>
23+
<module>samples</module>
24+
</modules>
25+
26+
<build>
27+
<plugins>
28+
<plugin>
29+
<groupId>org.apache.maven.plugins</groupId>
30+
<artifactId>maven-enforcer-plugin</artifactId>
31+
<version>1.4.1</version>
32+
<executions>
33+
<execution>
34+
<id>enforce-versions</id>
35+
<goals>
36+
<goal>enforce</goal>
37+
</goals>
38+
<configuration>
39+
<fail>true</fail>
40+
<rules>
41+
<requireMavenVersion>
42+
<version>3.3.9</version>
43+
</requireMavenVersion>
44+
<requireJavaVersion>
45+
<version>1.7</version>
46+
</requireJavaVersion>
47+
</rules>
48+
</configuration>
49+
</execution>
50+
</executions>
51+
</plugin>
52+
</plugins>
53+
<pluginManagement>
54+
<plugins>
55+
<plugin>
56+
<artifactId>maven-compiler-plugin</artifactId>
57+
<version>3.5.1</version>
58+
<configuration>
59+
<source>1.7</source>
60+
<target>1.7</target>
61+
</configuration>
62+
</plugin>
63+
</plugins>
64+
</pluginManagement>
65+
</build>
66+
</project>
Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,22 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
33
<modelVersion>4.0.0</modelVersion>
4-
<groupId>com.onelogin</groupId>
5-
<artifactId>java-saml-jspsample</artifactId>
6-
<packaging>war</packaging>
7-
<version>2.0.0</version>
8-
<name>Onelogin java-saml Sample Webapp</name>
4+
<parent>
5+
<groupId>com.onelogin</groupId>
6+
<artifactId>java-saml-tookit-samples</artifactId>
7+
<version>2.0.0-SNAPSHOT</version>
8+
</parent>
99

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

1414
<dependencies>
1515
<dependency>
1616
<groupId>com.onelogin</groupId>
1717
<artifactId>java-saml</artifactId>
18-
<version>2.0.0</version>
18+
<version>${project.version}</version>
1919
</dependency>
2020
</dependencies>
21-
<build>
22-
<finalName>java-saml-jspsample</finalName>
23-
<!-- Set JDK Compiler Level -->
24-
<plugins>
25-
<plugin>
26-
<groupId>org.apache.maven.plugins</groupId>
27-
<artifactId>maven-compiler-plugin</artifactId>
28-
<version>2.3.2</version>
29-
<configuration>
30-
<source>${jdk.version}</source>
31-
<target>${jdk.version}</target>
32-
</configuration>
33-
</plugin>
34-
</plugins>
35-
</build>
36-
3721

3822
</project>

samples/pom.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<parent>
5+
<groupId>com.onelogin</groupId>
6+
<artifactId>java-saml-toolkit</artifactId>
7+
<version>2.0.0-SNAPSHOT</version>
8+
</parent>
9+
10+
<artifactId>java-saml-tookit-samples</artifactId>
11+
<name>Onelogin java-saml Toolkit Samples</name>
12+
<packaging>pom</packaging>
13+
14+
<modules>
15+
<module>java-saml-jspsample</module>
16+
</modules>
17+
18+
</project>

0 commit comments

Comments
 (0)