blob: f175cf152204c92a7535f9ab945d670482f9088e [file] [log] [blame]
Brian Silverman9c614bc2016-02-15 20:20:02 -05001<?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>
Austin Schuh40c16522018-10-28 20:27:54 -07009 <version>3.6.1</version>
Brian Silverman9c614bc2016-02-15 20:20:02 -050010 </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>
Austin Schuh40c16522018-10-28 20:27:54 -070031 <version>2.7</version>
Brian Silverman9c614bc2016-02-15 20:20:02 -050032 </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
Austin Schuh40c16522018-10-28 20:27:54 -070082 <!-- Add the generated test sources to the build -->
Brian Silverman9c614bc2016-02-15 20:20:02 -050083 <plugin>
Austin Schuh40c16522018-10-28 20:27:54 -070084 <groupId>org.codehaus.mojo</groupId>
85 <artifactId>build-helper-maven-plugin</artifactId>
86 <executions>
87 <execution>
88 <id>add-generated-test-sources</id>
89 <phase>generate-test-sources</phase>
90 <goals>
91 <goal>add-test-source</goal>
92 </goals>
93 <configuration>
94 <sources>
95 <source>${generated.testsources.dir}</source>
96 </sources>
97 </configuration>
98 </execution>
99 </executions>
Brian Silverman9c614bc2016-02-15 20:20:02 -0500100 </plugin>
101
102 <!-- Configure the OSGI bundle -->
103 <plugin>
104 <groupId>org.apache.felix</groupId>
105 <artifactId>maven-bundle-plugin</artifactId>
106 <extensions>true</extensions>
107 <configuration>
108 <instructions>
109 <Bundle-DocURL>https://developers.google.com/protocol-buffers/</Bundle-DocURL>
110 <Bundle-SymbolicName>com.google.protobuf.util</Bundle-SymbolicName>
111 <Export-Package>com.google.protobuf.util;version=${project.version}</Export-Package>
112 </instructions>
113 </configuration>
114 </plugin>
115
116 <!-- Configure the fat jar to include all dependencies -->
117 <plugin>
118 <artifactId>maven-assembly-plugin</artifactId>
119 <configuration>
120 <descriptorRefs>
121 <descriptorRef>jar-with-dependencies</descriptorRef>
122 </descriptorRefs>
123 </configuration>
124 </plugin>
125 </plugins>
126 </build>
127</project>