Home | History | Annotate | Download | only in util
      1 <?xml version="1.0" encoding="UTF-8"?>
      2 <project xmlns="http://maven.apache.org/POM/4.0.0"
      3   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      4   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
      5   <modelVersion>4.0.0</modelVersion>
      6   <parent>
      7     <groupId>com.google.protobuf</groupId>
      8     <artifactId>protobuf-parent</artifactId>
      9     <version>3.0.0-beta-3</version>
     10   </parent>
     11 
     12   <artifactId>protobuf-java-util</artifactId>
     13   <packaging>bundle</packaging>
     14 
     15   <name>Protocol Buffers [Util]</name>
     16   <description>Utilities for Protocol Buffers</description>
     17 
     18   <dependencies>
     19     <dependency>
     20       <groupId>${project.groupId}</groupId>
     21       <artifactId>protobuf-java</artifactId>
     22       <version>${project.version}</version>
     23     </dependency>
     24     <dependency>
     25       <groupId>com.google.guava</groupId>
     26       <artifactId>guava</artifactId>
     27     </dependency>
     28     <dependency>
     29       <groupId>com.google.code.gson</groupId>
     30       <artifactId>gson</artifactId>
     31       <version>2.3</version>
     32     </dependency>
     33     <dependency>
     34       <groupId>junit</groupId>
     35       <artifactId>junit</artifactId>
     36     </dependency>
     37     <dependency>
     38       <groupId>org.easymock</groupId>
     39       <artifactId>easymock</artifactId>
     40     </dependency>
     41     <dependency>
     42       <groupId>org.easymock</groupId>
     43       <artifactId>easymockclassextension</artifactId>
     44     </dependency>
     45   </dependencies>
     46 
     47   <properties>
     48     <!-- Use the core proto dir so that we can call the core generation script -->
     49     <test.proto.dir>../core/src/test/proto</test.proto.dir>
     50   </properties>
     51 
     52   <build>
     53     <plugins>
     54       <plugin>
     55         <artifactId>maven-antrun-plugin</artifactId>
     56         <executions>
     57           <!-- Generate the test protos -->
     58           <execution>
     59             <id>generate-test-sources</id>
     60             <phase>generate-test-sources</phase>
     61             <configuration>
     62               <target>
     63                 <!-- Generate all of the test protos from the core module -->
     64                 <ant antfile="../core/generate-test-sources-build.xml"/>
     65 
     66                 <!-- Generate additional test protos for this module -->
     67                 <exec executable="${protoc}">
     68                   <arg value="--java_out=${generated.testsources.dir}" />
     69                   <arg value="--proto_path=${protobuf.source.dir}" />
     70                   <arg value="--proto_path=src/test/proto" />
     71                   <arg value="src/test/proto/com/google/protobuf/util/json_test.proto" />
     72                 </exec>
     73               </target>
     74             </configuration>
     75             <goals>
     76               <goal>run</goal>
     77             </goals>
     78           </execution>
     79         </executions>
     80       </plugin>
     81 
     82       <plugin>
     83         <artifactId>maven-compiler-plugin</artifactId>
     84         <configuration>
     85           <!-- Add the generated test sources to the build -->
     86           <generatedTestSourcesDirectory>${generated.testsources.dir}</generatedTestSourcesDirectory>
     87         </configuration>
     88       </plugin>
     89 
     90       <!-- Configure the OSGI bundle -->
     91       <plugin>
     92         <groupId>org.apache.felix</groupId>
     93         <artifactId>maven-bundle-plugin</artifactId>
     94         <extensions>true</extensions>
     95         <configuration>
     96           <instructions>
     97             <Bundle-DocURL>https://developers.google.com/protocol-buffers/</Bundle-DocURL>
     98             <Bundle-SymbolicName>com.google.protobuf.util</Bundle-SymbolicName>
     99             <Export-Package>com.google.protobuf.util;version=${project.version}</Export-Package>
    100           </instructions>
    101         </configuration>
    102       </plugin>
    103 
    104       <!-- Configure the fat jar to include all dependencies -->
    105       <plugin>
    106         <artifactId>maven-assembly-plugin</artifactId>
    107         <configuration>
    108           <descriptorRefs>
    109             <descriptorRef>jar-with-dependencies</descriptorRef>
    110           </descriptorRefs>
    111         </configuration>
    112       </plugin>
    113     </plugins>
    114   </build>
    115 </project>
    116