Home | History | Annotate | Download | only in guava
      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"
      3   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
      4   <modelVersion>4.0.0</modelVersion>
      5   <parent>
      6     <groupId>com.google.guava</groupId>
      7     <artifactId>guava-parent-jdk5</artifactId>
      8     <version>17.0</version>
      9   </parent>
     10   <artifactId>guava-jdk5</artifactId>
     11   <name>Guava: Google Core Libraries for Java (JDK5 Backport)</name>
     12   <packaging>bundle</packaging>
     13   <description>
     14     Guava is a suite of core and expanded libraries that include
     15     utility classes, google's collections, io classes, and much
     16     much more.
     17 
     18     Guava has only one code dependency - javax.annotation,
     19     per the JSR-305 spec.
     20   </description>
     21   <dependencies>
     22     <dependency>
     23       <groupId>com.google.code.findbugs</groupId>
     24       <artifactId>jsr305</artifactId>
     25       <optional>true</optional><!-- needed only for annotations -->
     26     </dependency>
     27     <!-- TODO(cpovirk): want this only for dependency plugin but seems not to work there? Maven runs without failure, but the resulting Javadoc is missing the hoped-for inherited text -->
     28     <dependency>
     29       <groupId>${project.groupId}</groupId>
     30       <artifactId>guava-bootstrap-jdk5</artifactId>
     31       <version>${project.version}</version>
     32       <scope>provided</scope>
     33     </dependency>
     34   </dependencies>
     35   <build>
     36     <plugins>
     37       <plugin>
     38         <groupId>org.apache.felix</groupId>
     39         <artifactId>maven-bundle-plugin</artifactId>
     40         <version>2.3.7</version>
     41         <extensions>true</extensions>
     42         <executions>
     43           <execution>
     44             <id>bundle-manifest</id>
     45             <phase>process-classes</phase>
     46             <goals>
     47               <goal>manifest</goal>
     48             </goals>
     49           </execution>
     50         </executions>
     51         <configuration>
     52           <instructions>
     53             <Export-Package>!com.google.common.base.internal,com.google.common.*</Export-Package>
     54             <Import-Package>
     55               javax.annotation;resolution:=optional,
     56               javax.inject;resolution:=optional,
     57               sun.misc.*;resolution:=optional
     58             </Import-Package>
     59           </instructions>
     60         </configuration>
     61       </plugin>
     62       <plugin>
     63         <artifactId>maven-compiler-plugin</artifactId>
     64         <configuration>
     65           <!-- Prepend guava-bootstrap to avoid an API incompatibility between JDK5 and JDK6 -->
     66           <compilerArgument>-Xbootclasspath/p:${project.build.directory}/dependency/guava-bootstrap-jdk5-${project.version}.jar</compilerArgument>
     67         </configuration>
     68       </plugin>
     69       <plugin>
     70         <artifactId>maven-source-plugin</artifactId>
     71       </plugin>
     72       <!-- TODO(cpovirk): include JDK sources when building testlib doc, too -->
     73       <plugin>
     74         <artifactId>maven-dependency-plugin</artifactId>
     75         <executions>
     76           <execution>
     77             <id>prep-guava-bootstrap</id>
     78             <phase>process-sources</phase>
     79             <goals><goal>copy-dependencies</goal></goals>
     80             <configuration>
     81               <includeArtifactIds>guava-bootstrap-jdk5</includeArtifactIds>
     82             </configuration>
     83           </execution>
     84           <execution>
     85             <id>unpack-jdk-sources</id>
     86             <phase>site</phase>
     87             <goals><goal>unpack-dependencies</goal></goals>
     88             <configuration>
     89               <includeArtifactIds>srczip</includeArtifactIds>
     90               <overWrite>true</overWrite>
     91               <outputDirectory>${project.build.directory}/jdk-sources</outputDirectory>
     92               <silent>false</silent>
     93             </configuration>
     94           </execution>
     95         </executions>
     96       </plugin>
     97       <plugin>
     98         <groupId>org.codehaus.mojo</groupId>
     99         <artifactId>animal-sniffer-maven-plugin</artifactId>
    100       </plugin>
    101       <plugin>
    102         <groupId>org.apache.maven.plugins</groupId>
    103         <artifactId>maven-javadoc-plugin</artifactId>
    104         <configuration>
    105           <encoding>UTF-8</encoding>
    106           <docencoding>UTF-8</docencoding>
    107           <charset>UTF-8</charset>
    108           <additionalparam>-XDignore.symbol.file</additionalparam>
    109           <excludePackageNames>com.google.common.base.internal</excludePackageNames>
    110           <linksource>true</linksource>
    111           <links>
    112             <link>http://jsr-305.googlecode.com/svn/trunk/javadoc</link>
    113             <link>http://docs.oracle.com/javase/7/docs/api/</link>
    114           </links>
    115           <!-- TODO(cpovirk): can we use includeDependencySources and a local com.oracle.java:jdk-lib:noversion:sources instead of all this unzipping and manual sourcepath modification? -->
    116           <sourcepath>${project.build.sourceDirectory}:${project.build.directory}/jdk-sources</sourcepath>
    117           <subpackages>com.google.common</subpackages>
    118         </configuration>
    119         <executions>
    120           <execution>
    121             <id>attach-docs</id>
    122           </execution>
    123           <execution>
    124             <id>generate-javadoc-site-report</id>
    125             <phase>site</phase>
    126             <goals><goal>javadoc</goal></goals>
    127           </execution>
    128           <execution>
    129             <id>generate-jdiff-site-report</id>
    130             <phase>site</phase>
    131             <goals><goal>javadoc</goal></goals>
    132             <configuration>
    133               <doclet>jdiff.JDiff</doclet>
    134               <docletPath>${project.basedir}/lib/jdiff.jar</docletPath>
    135               <additionalparam>
    136                 -XDignore.symbol.file -apiname 'Guava ${project.version}'
    137               </additionalparam>
    138               <useStandardDocletOptions>false</useStandardDocletOptions>
    139               <reportOutputDirectory>${project.reporting.outputDirectory}</reportOutputDirectory>
    140               <destDir>jdiff</destDir>
    141             </configuration>
    142           </execution>
    143         </executions>
    144       </plugin>
    145     </plugins>
    146   </build>
    147   <profiles>
    148     <profile>
    149       <id>srczip</id>
    150       <activation>
    151         <file>
    152           <exists>${java.home}/../src.zip</exists>
    153         </file>
    154       </activation>
    155       <dependencies>
    156         <dependency>
    157           <groupId>jdk</groupId>
    158           <artifactId>srczip</artifactId>
    159           <version>999</version>
    160           <scope>system</scope>
    161           <systemPath>${java.home}/../src.zip</systemPath>
    162           <optional>true</optional>
    163         </dependency>
    164       </dependencies>
    165     </profile>
    166   </profiles>
    167 </project>
    168