Home | History | Annotate | Download | only in core
      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.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   </dependencies>
     74 
     75   <build>
     76     <plugins>
     77       <!--
     78        | Add standard LICENSE and NOTICE files
     79       -->
     80       <plugin>
     81         <artifactId>maven-remote-resources-plugin</artifactId>
     82       </plugin>
     83       <!--
     84        | Enable Java6 conformance checks
     85       -->
     86       <plugin>
     87         <groupId>org.codehaus.mojo</groupId>
     88         <artifactId>animal-sniffer-maven-plugin</artifactId>
     89       </plugin>
     90       <plugin>
     91         <artifactId>maven-surefire-plugin</artifactId>
     92         <configuration>
     93           <!--
     94            | Temporarily excluded tests
     95           -->
     96           <excludes>
     97             <exclude>**/*$*</exclude>
     98             <exclude>**/ErrorHandlingTest*</exclude>
     99             <exclude>**/OSGiContainerTest*</exclude>
    100             <exclude>**/ScopesTest*</exclude>
    101             <exclude>**/TypeConversionTest*</exclude>
    102           </excludes>
    103         </configuration>
    104       </plugin>
    105       <!--
    106        | Add OSGi manifest
    107       -->
    108       <plugin>
    109         <groupId>org.apache.felix</groupId>
    110         <artifactId>maven-bundle-plugin</artifactId>
    111         <configuration>
    112           <instructions>
    113             <Bundle-Name>${project.artifactId}$(if;$(classes;NAMED;*.MethodAspect);; (no_aop))</Bundle-Name>
    114             <Import-Package>!net.sf.cglib.*,!org.objectweb.asm.*,!com.google.inject.*,*</Import-Package>
    115             <Eclipse-ExtensibleAPI>true</Eclipse-ExtensibleAPI>
    116           </instructions>
    117         </configuration>
    118       </plugin>
    119       <!--
    120        | Remove duplicate jarjar'd LICENSE and NOTICE
    121       -->
    122       <plugin>
    123         <artifactId>maven-jar-plugin</artifactId>
    124         <configuration>
    125           <excludes>
    126             <exclude>LICENSE</exclude>
    127             <exclude>NOTICE</exclude>
    128           </excludes>
    129         </configuration>
    130       </plugin>
    131       <!--
    132        | Generate sources jar
    133       -->
    134       <plugin>
    135         <artifactId>maven-source-plugin</artifactId>
    136       </plugin>
    137       <!--
    138        | Generate javadoc jar
    139       -->
    140       <plugin>
    141         <artifactId>maven-javadoc-plugin</artifactId>
    142       </plugin>
    143     </plugins>
    144   </build>
    145 
    146   <profiles>
    147     <profile>
    148       <!--
    149        | No-AOP profile: repeat the build lifecycle with munged no-AOP source
    150       -->
    151       <id>guice.with.no_aop</id>
    152       <activation>
    153         <property>
    154           <name>guice.with.no_aop</name>
    155           <value>!false</value>
    156         </property>
    157       </activation>
    158       <build>
    159         <plugins>
    160           <plugin>
    161             <groupId>org.sonatype.plugins</groupId>
    162             <artifactId>munge-maven-plugin</artifactId>
    163             <version>1.0</version>
    164             <executions>
    165               <execution>
    166                 <phase>prepare-package</phase>
    167                 <goals>
    168                   <goal>munge-fork</goal>
    169                 </goals>
    170                 <configuration>
    171                   <symbols>NO_AOP</symbols>
    172                   <excludes>
    173                     **/InterceptorBinding.java,
    174                     **/InterceptorBindingProcessor.java,
    175                     **/InterceptorStackCallback.java,
    176                     **/LineNumbers.java,
    177                     **/MethodAspect.java,
    178                     **/ProxyFactory.java,
    179                     **/BytecodeGenTest.java,
    180                     **/IntegrationTest.java,
    181                     **/MethodInterceptionTest.java,
    182                     **/ProxyFactoryTest.java
    183                   </excludes>
    184                 </configuration>
    185               </execution>
    186             </executions>
    187           </plugin>
    188           <!--
    189            | Package the no-AOP build with its own OSGi manifest and attach using "no_aop" classifier
    190           -->
    191           <plugin>
    192             <artifactId>maven-jar-plugin</artifactId>
    193             <executions>
    194               <execution>
    195                 <id>no_aop</id>
    196                 <phase>package</phase>
    197                 <goals>
    198                   <goal>jar</goal>
    199                 </goals>
    200                 <configuration>
    201                   <classesDirectory>${project.build.directory}/munged/classes</classesDirectory>
    202                   <classifier>no_aop</classifier>
    203                   <archive>
    204                     <manifestFile>${project.build.directory}/munged/classes/META-INF/MANIFEST.MF</manifestFile>
    205                   </archive>
    206                 </configuration>
    207               </execution>
    208             </executions>
    209           </plugin>
    210         </plugins>
    211       </build>
    212     </profile>
    213     <profile>
    214       <!--
    215        | JarJar build profile: Embed CGLIB (and ASM) classes under a Guice namespace
    216       -->
    217       <id>guice.with.jarjar</id>
    218       <activation>
    219         <property>
    220           <name>guice.with.jarjar</name>
    221           <value>!false</value>
    222         </property>
    223       </activation>
    224       <build>
    225         <plugins>
    226           <plugin>
    227             <groupId>org.sonatype.plugins</groupId>
    228             <artifactId>jarjar-maven-plugin</artifactId>
    229             <version>1.9</version>
    230             <executions>
    231               <execution>
    232                 <id>jarjar</id>
    233                 <goals><goal>jarjar</goal></goals>
    234               </execution>
    235             </executions>
    236             <configuration>
    237               <overwrite>true</overwrite>
    238               <includes>
    239                 <include>*:asm*</include>
    240                 <include>*:cglib</include>
    241               </includes>
    242               <rules>
    243                 <rule>
    244                   <pattern>net.sf.cglib.*</pattern>
    245                   <result>com.google.inject.internal.cglib.$@1</result>
    246                 </rule>
    247                 <rule>
    248                   <pattern>net.sf.cglib.**.*</pattern>
    249                   <result>com.google.inject.internal.cglib.@1.$@2</result>
    250                 </rule>
    251                 <rule>
    252                   <pattern>org.objectweb.asm.*</pattern>
    253                   <result>com.google.inject.internal.asm.$@1</result>
    254                 </rule>
    255                 <rule>
    256                   <pattern>org.objectweb.asm.**.*</pattern>
    257                   <result>com.google.inject.internal.asm.@1.$@2</result>
    258                 </rule>
    259                 <keep>
    260                   <pattern>com.google.inject.**</pattern>
    261                 </keep>
    262                 <keep>
    263                   <pattern>com.googlecode.**</pattern>
    264                 </keep>
    265               </rules>
    266             </configuration>
    267           </plugin>
    268           <plugin>
    269             <!--
    270              | Attach the original non-JarJar'd classes so extensions can compile against them
    271             -->
    272             <groupId>org.codehaus.mojo</groupId>
    273             <artifactId>build-helper-maven-plugin</artifactId>
    274             <version>1.8</version>
    275             <executions>
    276               <execution>
    277                 <id>classes</id>
    278                 <phase>package</phase>
    279                 <goals>
    280                   <goal>attach-artifact</goal>
    281                 </goals>
    282                 <configuration>
    283                   <artifacts>
    284                     <artifact>
    285                       <file>${project.build.directory}/original-${project.build.finalName}.jar</file>
    286                       <classifier>classes</classifier>
    287                     </artifact>
    288                   </artifacts>
    289                 </configuration>
    290               </execution>
    291             </executions>
    292           </plugin>
    293         </plugins>
    294       </build>
    295     </profile>
    296     <profile>
    297       <!--
    298        | m2e profile - enable use of JarJar inside Eclipse
    299       -->
    300       <id>m2e</id>
    301       <activation>
    302         <property>
    303           <name>m2e.version</name>
    304         </property>
    305       </activation>
    306       <build>
    307         <pluginManagement>
    308           <plugins>
    309             <plugin>
    310               <groupId>org.eclipse.m2e</groupId>
    311               <artifactId>lifecycle-mapping</artifactId>
    312               <version>1.0.0</version>
    313               <configuration>
    314                 <lifecycleMappingMetadata>
    315                   <pluginExecutions>
    316                     <pluginExecution>
    317                       <pluginExecutionFilter>
    318                         <groupId>org.sonatype.plugins</groupId>
    319                         <artifactId>jarjar-maven-plugin</artifactId>
    320                         <versionRange>[1.4,)</versionRange>
    321                         <goals><goal>jarjar</goal></goals>
    322                       </pluginExecutionFilter>
    323                       <action><execute /></action>
    324                     </pluginExecution>
    325                   </pluginExecutions>
    326                 </lifecycleMappingMetadata>
    327               </configuration>
    328             </plugin>
    329           </plugins>
    330         </pluginManagement>
    331       </build>
    332     </profile>
    333   </profiles>
    334 </project>
    335