Add some comments to the Maven POMs
git-svn-id: https://google-guice.googlecode.com/svn/trunk@1367 d779f126-a31b-0410-b53b-1d3aecad763e
diff --git a/core/pom.xml b/core/pom.xml
index e0f7040..405d18d 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -52,6 +52,9 @@
<build>
<plugins>
+ <!--
+ | Enable Java5 conformance checks
+ -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
@@ -59,14 +62,19 @@
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
+ <!--
+ | Temporarily excluded tests
+ -->
<excludes>
- <exclude>**/BytecodeGenTest*</exclude>
<exclude>**/OSGiContainerTest*</exclude>
<exclude>**/ScopesTest*</exclude>
<exclude>**/TypeConversionTest*</exclude>
</excludes>
</configuration>
</plugin>
+ <!--
+ | Add OSGi manifest
+ -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
@@ -76,6 +84,9 @@
<profiles>
<profile>
+ <!--
+ | No-AOP profile: repeat the build lifecycle with munged no-AOP source
+ -->
<id>guice.with.noaop</id>
<activation>
<property>
@@ -113,6 +124,9 @@
</execution>
</executions>
</plugin>
+ <!--
+ | Package the no-AOP build with its own OSGi manifest and attach using "noaop" classifier
+ -->
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<executions>
@@ -136,6 +150,9 @@
</build>
</profile>
<profile>
+ <!--
+ | JarJar build profile: re-package ASM and CGLIB classes under the Guice namespace
+ -->
<id>guice.with.jarjar</id>
<activation>
<property>
@@ -156,6 +173,9 @@
</configuration>
</plugin>
<plugin>
+ <!--
+ | Package the original non-JarJar'd classes so extensions can compile against them
+ -->
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
diff --git a/extensions/persist/pom.xml b/extensions/persist/pom.xml
index b2cd3f2..2c787b1 100644
--- a/extensions/persist/pom.xml
+++ b/extensions/persist/pom.xml
@@ -28,12 +28,6 @@
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>1.6.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.6.1</version>
<scope>test</scope>
@@ -52,4 +46,15 @@
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <forkMode>never</forkMode>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
diff --git a/extensions/pom.xml b/extensions/pom.xml
index afd07b1..9cc27ca 100644
--- a/extensions/pom.xml
+++ b/extensions/pom.xml
@@ -28,17 +28,25 @@
<module>struts2</module>
<module>throwingproviders</module>
<!--
+ | not yet promoted...
+- -
<module>mini</module>
<module>service</module>
-->
</modules>
<dependencies>
+ <!--
+ | All extensions depend on the core
+ -->
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>${project.version}</version>
</dependency>
+ <!--
+ | Some extension tests depend on the core tests
+ -->
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
@@ -50,10 +58,16 @@
<build>
<plugins>
+ <!--
+ | Enable Java5 conformance checks
+ -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
</plugin>
+ <!--
+ | Add OSGi manifest: extensions are fragments that attach to the core
+ -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
@@ -68,6 +82,9 @@
<profiles>
<profile>
+ <!--
+ | JarJar build profile: re-package ASM and CGLIB references under the Guice namespace
+ -->
<id>guice.with.jarjar</id>
<activation>
<property>
@@ -76,6 +93,10 @@
</property>
</activation>
<dependencies>
+ <!--
+ | Extensions compile first against the non-JarJar'd core - and are then JarJar'd themselves
+ | (optional dependency so it doesn't leak to client projects that depend on Guice artifacts)
+ -->
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
diff --git a/pom.xml b/pom.xml
index 5fefce8..ad61fca 100644
--- a/pom.xml
+++ b/pom.xml
@@ -90,19 +90,34 @@
</modules>
<properties>
+ <!--
+ | The spec version of the public Guice API
+ -->
<guice.api.version>1.3</guice.api.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <!--
+ | Use "-Dguice.with.jarjar=false" to build without jarjar
+ -->
<guice.with.jarjar>true</guice.with.jarjar>
+ <!--
+ | Use "-Dguice.with.noaop=false" to skip the no-AOP variant
+ -->
<guice.with.noaop>true</guice.with.noaop>
</properties>
<dependencies>
+ <!--
+ | Replace with official CGLIB artifact when it's released
+ -->
<dependency>
<groupId>org.sonatype.sisu.inject</groupId>
<artifactId>cglib</artifactId>
<version>2.2.1</version>
<optional>${guice.with.jarjar}</optional>
</dependency>
+ <!--
+ | Run tests with TestNG
+ -->
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
@@ -113,6 +128,9 @@
</dependencies>
<build>
+ <!--
+ | Ant-style directories
+ -->
<sourceDirectory>${project.basedir}/src</sourceDirectory>
<resources>
<resource>
@@ -139,6 +157,9 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
</plugin>
+ <!--
+ | Make sure we only use Java5 methods
+ -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
@@ -160,6 +181,9 @@
</execution>
</executions>
</plugin>
+ <!--
+ | Shared JarJar configuration
+ -->
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>jarjar-maven-plugin</artifactId>
@@ -198,6 +222,9 @@
</keep>
</rules>
</configuration>
+ <!--
+ | JarJar all classes before running tests
+ -->
<executions>
<execution>
<id>jarjar-classes</id>
@@ -228,6 +255,9 @@
<redirectTestOutputToFile>true</redirectTestOutputToFile>
</configuration>
</plugin>
+ <!--
+ | Shared OSGi manifest configuration
+ -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
@@ -265,6 +295,9 @@
</execution>
</executions>
</plugin>
+ <!--
+ | Package OSGi manifest in final JAR, also create a JAR of the test classes
+ -->
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.1</version>
@@ -307,6 +340,9 @@
<profiles>
<profile>
+ <!--
+ | Deployment profile for the Sonatype Grid
+ -->
<id>sonatype-grid</id>
<properties>
<forgeReleaseId>forge-releases</forgeReleaseId>