Revision: 1360
Author: mcculls
Date: Wed Nov 3 19:22:00 2010
Log: Update Maven poms to use new jarjar processing rules, allow jarjar and
munge profiles to be turned off, and synchronize bundle headers in Ant and
Maven builds
http://code.google.com/p/google-guice/source/detail?r=1360
Modified:
/trunk/common.xml
/trunk/core/pom.xml
/trunk/extensions/persist/pom.xml
/trunk/extensions/pom.xml
/trunk/extensions/service/pom.xml
/trunk/extensions/servlet/pom.xml
/trunk/extensions/spring/pom.xml
/trunk/extensions/struts2/pom.xml
/trunk/pom.xml
=======================================
--- /trunk/common.xml Tue Oct 26 19:40:07 2010
+++ /trunk/common.xml Wed Nov 3 19:22:00 2010
@@ -37,8 +37,9 @@
<property name="Bundle-Description" value="Guice is a lightweight
dependency injection framework for Java 5 and above"/>
<property name="Bundle-DocURL"
value="http://code.google.com/p/google-guice/"/>
<property name="Bundle-Copyright" value="Copyright (C) 2006 Google
Inc."/>
- <property name="Bundle-License"
value="http://www.apache.org/licenses/LICENSE-2.0"/>
- <property name="Bundle-Vendor" value="Google Inc."/>
+ <property name="Bundle-License"
value="http://www.apache.org/licenses/LICENSE-2.0.txt"/>
+ <property name="Bundle-RequiredExecutionEnvironment"
value="J2SE-1.5,JavaSE-1.6"/>
+ <property name="Bundle-Vendor" value="Google, Inc."/>
<property name="Export-Package"
value="!${module}.internal.*,${module}.*;version=${api.version}"/>
=======================================
--- /trunk/core/pom.xml Thu Oct 21 16:36:09 2010
+++ /trunk/core/pom.xml Wed Nov 3 19:22:00 2010
@@ -17,35 +17,35 @@
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
+ <version>1</version>
</dependency>
<dependency>
<groupId>aopalliance</groupId>
<artifactId>aopalliance</artifactId>
- </dependency>
- <dependency>
- <groupId>org.sonatype.sisu.inject</groupId>
- <artifactId>cglib</artifactId>
- <version>2.2.1</version>
- <optional>true</optional>
+ <version>1.0</version>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject-tck</artifactId>
+ <version>1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
+ <version>3.0.5.RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>biz.aQute</groupId>
<artifactId>bnd</artifactId>
+ <version>0.0.384</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.framework</artifactId>
+ <version>3.0.5</version>
<scope>test</scope>
</dependency>
</dependencies>
@@ -53,102 +53,127 @@
<build>
<plugins>
<plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>animal-sniffer-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <includes>
- <include>**/AllTests.java</include>
- </includes>
+ <excludes>
+ <exclude>**/OSGiContainerTest*</exclude>
+ <exclude>**/ScopesTest*</exclude>
+ <exclude>**/TypeConversionTest*</exclude>
+ <exclude>**/*$*</exclude>
+ </excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
- <configuration>
- <instructions>
- <Bundle-SymbolicName>com.google.inject</Bundle-SymbolicName>
-
<Import-Package>!*.asm.*,!*.cglib.*,!com.google.inject.*,*</Import-Package>
- </instructions>
- </configuration>
</plugin>
- <plugin>
- <groupId>org.sonatype.plugins</groupId>
- <artifactId>munge-maven-plugin</artifactId>
- <version>1.0</version>
- <executions>
- <execution>
- <phase>prepare-package</phase>
- <goals>
- <goal>munge-fork</goal>
- </goals>
- <configuration>
- <symbols>NO_AOP</symbols>
- <excludes>
- **/InterceptorBinding.java,
- **/InterceptorBindingProcessor.java,
- **/InterceptorStackCallback.java,
- **/LineNumbers.java,
- **/MethodAspect.java,
- **/ProxyFactory.java,
- **/BytecodeGenTest.java,
- **/IntegrationTest.java,
- **/MethodInterceptionTest.java,
- **/ProxyFactoryTest.java
- </excludes>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-jar-plugin</artifactId>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>jar</goal>
- </goals>
- <configuration>
- <archive>
-
<manifestFile>target/munged/classes/META-INF/MANIFEST.MF</manifestFile>
- </archive>
- <classesDirectory>target/munged/classes</classesDirectory>
- <classifier>noaop</classifier>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.sonatype.plugins</groupId>
- <artifactId>jarjar-maven-plugin</artifactId>
- <version>1.2</version>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>jarjar</goal>
- </goals>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>guice.with.noaop</id>
+ <activation>
+ <property>
+ <name>guice.with.noaop</name>
+ <value>!false</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.sonatype.plugins</groupId>
+ <artifactId>munge-maven-plugin</artifactId>
+ <version>1.0</version>
+ <executions>
+ <execution>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>munge-fork</goal>
+ </goals>
+ <configuration>
+ <symbols>NO_AOP</symbols>
+ <excludes>
+ **/InterceptorBinding.java,
+ **/InterceptorBindingProcessor.java,
+ **/InterceptorStackCallback.java,
+ **/LineNumbers.java,
+ **/MethodAspect.java,
+ **/ProxyFactory.java,
+ **/BytecodeGenTest.java,
+ **/IntegrationTest.java,
+ **/MethodInterceptionTest.java,
+ **/ProxyFactoryTest.java
+ </excludes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>noaop</id>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ <configuration>
+
<classesDirectory>${project.build.directory}/munged/classes</classesDirectory>
+ <classifier>noaop</classifier>
+ <archive>
+
<manifestFile>${project.build.directory}/munged/classes/META-INF/MANIFEST.MF</manifestFile>
+ </archive>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>guice.with.jarjar</id>
+ <activation>
+ <property>
+ <name>guice.with.jarjar</name>
+ <value>!false</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.sonatype.plugins</groupId>
+ <artifactId>jarjar-maven-plugin</artifactId>
<configuration>
<includes>
- <include>asm:asm</include>
- <include>org.sonatype.sisu.inject:cglib</include>
+ <include>*:asm</include>
+ <include>*:cglib</include>
</includes>
- <rules>
- <rule>
- <pattern>org.objectweb.asm.**</pattern>
- <result>com.google.inject.internal.a...@1</result>
- </rule>
- <rule>
- <pattern>net.sf.cglib.**</pattern>
- <result>com.google.inject.internal.cgl...@1</result>
- </rule>
- <keep>
- <pattern>com.google.inject.**</pattern>
- </keep>
- </rules>
</configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>nodeps</id>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ <configuration>
+
<classesDirectory>${project.build.directory}/original-classes</classesDirectory>
+ <classifier>nodeps</classifier>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
=======================================
--- /trunk/extensions/persist/pom.xml Thu Oct 21 16:36:09 2010
+++ /trunk/extensions/persist/pom.xml Wed Nov 3 19:22:00 2010
@@ -18,16 +18,19 @@
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>1.6.1</version>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.6.1</version>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
@@ -43,17 +46,4 @@
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <excludes>
- <exclude>**/DynamicFinderTest.java</exclude>
- </excludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
</project>
=======================================
--- /trunk/extensions/pom.xml Thu Oct 21 16:36:09 2010
+++ /trunk/extensions/pom.xml Wed Nov 3 19:22:00 2010
@@ -51,6 +51,10 @@
<build>
<plugins>
<plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>animal-sniffer-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
@@ -62,4 +66,38 @@
</plugins>
</build>
+ <profiles>
+ <profile>
+ <id>guice.with.jarjar</id>
+ <activation>
+ <property>
+ <name>guice.with.jarjar</name>
+ <value>!false</value>
+ </property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>com.google.inject</groupId>
+ <artifactId>guice</artifactId>
+ <version>${project.version}</version>
+ <classifier>nodeps</classifier>
+ <optional>true</optional>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.sonatype.plugins</groupId>
+ <artifactId>jarjar-maven-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>*:*</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
</project>
=======================================
--- /trunk/extensions/service/pom.xml Thu Oct 21 16:36:09 2010
+++ /trunk/extensions/service/pom.xml Wed Nov 3 19:22:00 2010
@@ -13,15 +13,4 @@
<name>Google Guice - Extensions - Service</name>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <skipTests>true</skipTests>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
</project>
=======================================
--- /trunk/extensions/servlet/pom.xml Thu Oct 21 16:36:09 2010
+++ /trunk/extensions/servlet/pom.xml Wed Nov 3 19:22:00 2010
@@ -18,6 +18,7 @@
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
=======================================
--- /trunk/extensions/spring/pom.xml Thu Oct 21 16:36:09 2010
+++ /trunk/extensions/spring/pom.xml Wed Nov 3 19:22:00 2010
@@ -17,6 +17,8 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
+ <version>3.0.5.RELEASE</version>
+ <scope>provided</scope>
</dependency>
</dependencies>
=======================================
--- /trunk/extensions/struts2/pom.xml Thu Oct 21 16:36:09 2010
+++ /trunk/extensions/struts2/pom.xml Wed Nov 3 19:22:00 2010
@@ -20,9 +20,16 @@
<version>${project.version}</version>
</dependency>
<dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>2.2.1</version>
+ <scope>provided</scope>
</dependency>
</dependencies>
=======================================
--- /trunk/pom.xml Thu Oct 21 17:12:40 2010
+++ /trunk/pom.xml Wed Nov 3 19:22:00 2010
@@ -90,80 +90,27 @@
</modules>
<properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<guice.api.version>1.3</guice.api.version>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <guice.with.jarjar>true</guice.with.jarjar>
+ <guice.with.noaop>true</guice.with.noaop>
</properties>
<dependencies>
<dependency>
+ <groupId>org.sonatype.sisu.inject</groupId>
+ <artifactId>cglib</artifactId>
+ <version>2.2.1</version>
+ <optional>${guice.with.jarjar}</optional>
+ </dependency>
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
+ <version>3.8.2</version>
<scope>test</scope>
</dependency>
</dependencies>
- <dependencyManagement>
- <dependencies>
-
- <dependency>
- <groupId>biz.aQute</groupId>
- <artifactId>bnd</artifactId>
- <version>0.0.384</version>
- </dependency>
-
- <dependency>
- <groupId>javax.inject</groupId>
- <artifactId>javax.inject</artifactId>
- <version>1</version>
- </dependency>
- <dependency>
- <groupId>javax.inject</groupId>
- <artifactId>javax.inject-tck</artifactId>
- <version>1</version>
- </dependency>
- <dependency>
- <groupId>aopalliance</groupId>
- <artifactId>aopalliance</artifactId>
- <version>1.0</version>
- </dependency>
-
- <dependency>
- <groupId>asm</groupId>
- <artifactId>asm</artifactId>
- <version>3.1</version>
- </dependency>
-
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- <version>4.2.0</version>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- <version>4.2.0</version>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.framework</artifactId>
- <version>3.0.2</version>
- </dependency>
-
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-beans</artifactId>
- <version>2.5.6</version>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.2</version>
- </dependency>
-
- </dependencies>
- </dependencyManagement>
-
<build>
<sourceDirectory>${project.basedir}/src</sourceDirectory>
<resources>
@@ -213,8 +160,66 @@
</executions>
</plugin>
<plugin>
+ <groupId>org.sonatype.plugins</groupId>
+ <artifactId>jarjar-maven-plugin</artifactId>
+ <version>1.3-SNAPSHOT</version>
+ <configuration>
+ <rules>
+ <rule>
+ <pattern>net.sf.cglib.*</pattern>
+ <result>com.google.inject.internal.cgli...@1</result>
+ </rule>
+ <rule>
+ <pattern>net.sf.cglib.**.*</pattern>
+ <result>com.google.inject.internal.cgl...@1.$@2</result>
+ </rule>
+ <rule>
+ <pattern>org.objectweb.asm.*</pattern>
+ <result>com.google.inject.internal.as...@1</result>
+ </rule>
+ <rule>
+ <pattern>org.objectweb.asm.**.*</pattern>
+ <result>com.google.inject.internal.a...@1.$@2</result>
+ </rule>
+ <rule>
+ <pattern>com.google.inject.internal.util.*</pattern>
+ <result>com.google.inject.internal.uti...@1</result>
+ </rule>
+ <rule>
+ <pattern>com.google.inject.internal.util.**.*</pattern>
+ <result>com.google.inject.internal.ut...@1.$@2</result>
+ </rule>
+ <keep>
+ <pattern>com.google.inject.**</pattern>
+ </keep>
+ </rules>
+ </configuration>
+ <executions>
+ <execution>
+ <id>jarjar-classes</id>
+ <phase>process-test-classes</phase>
+ <goals>
+ <goal>jarjar</goal>
+ </goals>
+ <configuration>
+ <input>{classes}</input>
+ </configuration>
+ </execution>
+ <execution>
+ <id>jarjar-test-classes</id>
+ <phase>process-test-classes</phase>
+ <goals>
+ <goal>jarjar</goal>
+ </goals>
+ <configuration>
+ <input>{test-classes}</input>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<artifactId>maven-surefire-plugin</artifactId>
- <version>2.6</version>
+ <version>2.5</version>
<configuration>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
</configuration>
@@ -225,13 +230,17 @@
<version>2.1.0</version>
<configuration>
<instructions>
+ <module>com.google.inject</module>
+ <_include>-${project.basedir}/build.properties</_include>
<Bundle-Copyright>Copyright (C) 2006 Google
Inc.</Bundle-Copyright>
<Bundle-DocURL>http://code.google.com/p/google-guice/</Bundle-DocURL>
+ <Bundle-Name>${project.artifactId}</Bundle-Name>
+ <Bundle-SymbolicName>$(module)</Bundle-SymbolicName>
<Bundle-RequiredExecutionEnvironment>
J2SE-1.5,JavaSE-1.6
</Bundle-RequiredExecutionEnvironment>
<Import-Package>!com.google.inject.*,*</Import-Package>
-
<_exportcontents>!*.internal.*,com.google.inject.*;version=${guice.api.version}</_exportcontents>
+
<_exportcontents>!*.internal.*,$(module).*;version=${guice.api.version}</_exportcontents>
<_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>
<_nouses>true</_nouses>
<_removeheaders>
@@ -290,12 +299,6 @@
</plugin>
</plugins>
</pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>animal-sniffer-maven-plugin</artifactId>
- </plugin>
- </plugins>
</build>
<profiles>
--
You received this message because you are subscribed to the Google Groups
"google-guice-dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-guice-dev?hl=en.