1<?xml version="1.0" encoding="UTF-8"?>
2<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">
3
4  <modelVersion>4.0.0</modelVersion>
5
6  <parent>
7    <groupId>com.google.inject</groupId>
8    <artifactId>guice-parent</artifactId>
9    <version>4.2.0</version>
10  </parent>
11
12  <artifactId>guice</artifactId>
13
14  <name>Google Guice - Core Library</name>
15
16  <dependencies>
17    <dependency>
18      <groupId>javax.inject</groupId>
19      <artifactId>javax.inject</artifactId>
20    </dependency>
21    <dependency>
22      <groupId>aopalliance</groupId>
23      <artifactId>aopalliance</artifactId>
24    </dependency>
25    <dependency>
26      <groupId>com.google.guava</groupId>
27      <artifactId>guava</artifactId>
28    </dependency>
29    <!--
30     | CGLIB is embedded by default by the JarJar build profile
31    -->
32    <dependency>
33      <groupId>org.ow2.asm</groupId>
34      <artifactId>asm</artifactId>
35      <optional>true</optional>
36    </dependency>
37    <dependency>
38      <groupId>cglib</groupId>
39      <artifactId>cglib</artifactId>
40      <optional>true</optional>
41    </dependency>
42    <!--
43     | Test dependencies
44    -->
45    <dependency>
46      <groupId>javax.inject</groupId>
47      <artifactId>javax.inject-tck</artifactId>
48      <scope>test</scope>
49    </dependency>
50    <dependency>
51      <groupId>com.google.guava</groupId>
52      <artifactId>guava-testlib</artifactId>
53      <scope>test</scope>
54    </dependency>
55    <dependency>
56      <groupId>org.springframework</groupId>
57      <artifactId>spring-beans</artifactId>
58      <version>3.0.5.RELEASE</version>
59      <scope>test</scope>
60    </dependency>
61    <dependency>
62      <groupId>biz.aQute</groupId>
63      <artifactId>bnd</artifactId>
64      <version>0.0.384</version>
65      <scope>test</scope>
66    </dependency>
67    <dependency>
68      <groupId>org.apache.felix</groupId>
69      <artifactId>org.apache.felix.framework</artifactId>
70      <version>3.0.5</version>
71      <scope>test</scope>
72    </dependency>
73    <dependency>
74      <groupId>com.google.truth</groupId>
75      <artifactId>truth</artifactId>
76      <scope>test</scope>
77    </dependency>
78  </dependencies>
79
80  <build>
81    <plugins>
82      <!--
83       | Add standard LICENSE and NOTICE files
84      -->
85      <plugin>
86        <artifactId>maven-remote-resources-plugin</artifactId>
87      </plugin>
88      <!--
89       | Enable Java6 conformance checks
90      -->
91      <plugin>
92        <groupId>org.codehaus.mojo</groupId>
93        <artifactId>animal-sniffer-maven-plugin</artifactId>
94      </plugin>
95      <plugin>
96        <artifactId>maven-surefire-plugin</artifactId>
97        <configuration>
98          <!--
99           | Temporarily excluded tests
100          -->
101          <excludes>
102            <exclude>**/*$*</exclude>
103            <exclude>**/ErrorHandlingTest*</exclude>
104            <exclude>**/OSGiContainerTest*</exclude>
105            <exclude>**/ScopesTest*</exclude>
106            <exclude>**/TypeConversionTest*</exclude>
107          </excludes>
108        </configuration>
109      </plugin>
110      <!--
111       | Add OSGi manifest
112      -->
113      <plugin>
114        <groupId>org.apache.felix</groupId>
115        <artifactId>maven-bundle-plugin</artifactId>
116        <configuration>
117          <instructions>
118            <Bundle-Name>${project.artifactId}$(if;$(classes;NAMED;*.MethodAspect);; (no_aop))</Bundle-Name>
119            <Import-Package>!net.sf.cglib.*,!org.objectweb.asm.*,!com.google.inject.*,*</Import-Package>
120            <Eclipse-ExtensibleAPI>true</Eclipse-ExtensibleAPI>
121          </instructions>
122        </configuration>
123      </plugin>
124      <!--
125       | Remove duplicate jarjar'd LICENSE and NOTICE
126      -->
127      <plugin>
128        <artifactId>maven-jar-plugin</artifactId>
129        <configuration>
130          <excludes>
131            <exclude>LICENSE</exclude>
132            <exclude>NOTICE</exclude>
133          </excludes>
134          <archive>
135            <manifestEntries>
136              <Automatic-Module-Name>com.google.guice</Automatic-Module-Name>
137            </manifestEntries>
138          </archive>
139        </configuration>
140      </plugin>
141      <!--
142       | Generate sources jar
143      -->
144      <plugin>
145        <artifactId>maven-source-plugin</artifactId>
146      </plugin>
147      <!--
148       | Generate javadoc jar
149      -->
150      <plugin>
151        <artifactId>maven-javadoc-plugin</artifactId>
152      </plugin>
153    </plugins>
154  </build>
155
156  <profiles>
157    <profile>
158      <!--
159       | No-AOP profile: repeat the build lifecycle with munged no-AOP source
160      -->
161      <id>guice.with.no_aop</id>
162      <activation>
163        <property>
164          <name>guice.with.no_aop</name>
165          <value>!false</value>
166        </property>
167      </activation>
168      <build>
169        <plugins>
170          <plugin>
171            <groupId>org.sonatype.plugins</groupId>
172            <artifactId>munge-maven-plugin</artifactId>
173            <version>1.0</version>
174            <executions>
175              <execution>
176                <phase>prepare-package</phase>
177                <goals>
178                  <goal>munge-fork</goal>
179                </goals>
180                <configuration>
181                  <symbols>NO_AOP</symbols>
182                  <excludes>
183                    **/InterceptorBinding.java,
184                    **/InterceptorBindingProcessor.java,
185                    **/InterceptorStackCallback.java,
186                    **/LineNumbers.java,
187                    **/MethodAspect.java,
188                    **/ProxyFactory.java,
189                    **/BytecodeGenTest.java,
190                    **/IntegrationTest.java,
191                    **/MethodInterceptionTest.java,
192                    **/ProxyFactoryTest.java
193                  </excludes>
194                </configuration>
195              </execution>
196            </executions>
197          </plugin>
198          <!--
199           | Package the no-AOP build with its own OSGi manifest and attach using "no_aop" classifier
200          -->
201          <plugin>
202            <artifactId>maven-jar-plugin</artifactId>
203            <executions>
204              <execution>
205                <id>no_aop</id>
206                <phase>package</phase>
207                <goals>
208                  <goal>jar</goal>
209                </goals>
210                <configuration>
211                  <classesDirectory>${project.build.directory}/munged/classes</classesDirectory>
212                  <classifier>no_aop</classifier>
213                  <archive>
214                    <manifestFile>${project.build.directory}/munged/classes/META-INF/MANIFEST.MF</manifestFile>
215                  </archive>
216                </configuration>
217              </execution>
218            </executions>
219          </plugin>
220        </plugins>
221      </build>
222    </profile>
223    <profile>
224      <!--
225       | JarJar build profile: Embed CGLIB (and ASM) classes under a Guice namespace
226      -->
227      <id>guice.with.jarjar</id>
228      <activation>
229        <property>
230          <name>guice.with.jarjar</name>
231          <value>!false</value>
232        </property>
233      </activation>
234      <build>
235        <plugins>
236          <plugin>
237            <groupId>org.sonatype.plugins</groupId>
238            <artifactId>jarjar-maven-plugin</artifactId>
239            <version>1.9</version>
240            <executions>
241              <execution>
242                <id>jarjar</id>
243                <goals><goal>jarjar</goal></goals>
244              </execution>
245            </executions>
246            <configuration>
247              <overwrite>true</overwrite>
248              <includes>
249                <include>*:asm*</include>
250                <include>*:cglib</include>
251              </includes>
252              <rules>
253                <rule>
254                  <pattern>net.sf.cglib.*</pattern>
255                  <result>com.google.inject.internal.cglib.$@1</result>
256                </rule>
257                <rule>
258                  <pattern>net.sf.cglib.**.*</pattern>
259                  <result>com.google.inject.internal.cglib.@1.$@2</result>
260                </rule>
261                <rule>
262                  <pattern>org.objectweb.asm.*</pattern>
263                  <result>com.google.inject.internal.asm.$@1</result>
264                </rule>
265                <rule>
266                  <pattern>org.objectweb.asm.**.*</pattern>
267                  <result>com.google.inject.internal.asm.@1.$@2</result>
268                </rule>
269                <keep>
270                  <pattern>com.google.inject.**</pattern>
271                </keep>
272                <keep>
273                  <pattern>com.googlecode.**</pattern>
274                </keep>
275              </rules>
276            </configuration>
277          </plugin>
278          <plugin>
279            <!--
280             | Attach the original non-JarJar'd classes so extensions can compile against them
281            -->
282            <groupId>org.codehaus.mojo</groupId>
283            <artifactId>build-helper-maven-plugin</artifactId>
284            <version>1.8</version>
285            <executions>
286              <execution>
287                <id>classes</id>
288                <phase>package</phase>
289                <goals>
290                  <goal>attach-artifact</goal>
291                </goals>
292                <configuration>
293                  <artifacts>
294                    <artifact>
295                      <file>${project.build.directory}/original-${project.build.finalName}.jar</file>
296                      <classifier>classes</classifier>
297                    </artifact>
298                  </artifacts>
299                </configuration>
300              </execution>
301            </executions>
302          </plugin>
303        </plugins>
304      </build>
305    </profile>
306    <profile>
307      <!--
308       | m2e profile - enable use of JarJar inside Eclipse
309      -->
310      <id>m2e</id>
311      <activation>
312        <property>
313          <name>m2e.version</name>
314        </property>
315      </activation>
316      <build>
317        <pluginManagement>
318          <plugins>
319            <plugin>
320              <groupId>org.eclipse.m2e</groupId>
321              <artifactId>lifecycle-mapping</artifactId>
322              <version>1.0.0</version>
323              <configuration>
324                <lifecycleMappingMetadata>
325                  <pluginExecutions>
326                    <pluginExecution>
327                      <pluginExecutionFilter>
328                        <groupId>org.sonatype.plugins</groupId>
329                        <artifactId>jarjar-maven-plugin</artifactId>
330                        <versionRange>[1.4,)</versionRange>
331                        <goals><goal>jarjar</goal></goals>
332                      </pluginExecutionFilter>
333                      <action><execute /></action>
334                    </pluginExecution>
335                  </pluginExecutions>
336                </lifecycleMappingMetadata>
337              </configuration>
338            </plugin>
339          </plugins>
340        </pluginManagement>
341      </build>
342    </profile>
343  </profiles>
344</project>
345