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 <modelVersion>4.0.0</modelVersion> 4 <parent> 5 <groupId>com.google.protobuf</groupId> 6 <artifactId>protobuf-parent</artifactId> 7 <version>3.13.0</version> 8 </parent> 9 10 <artifactId>protobuf-java-util</artifactId> 11 <packaging>bundle</packaging> 12 13 <name>Protocol Buffers [Util]</name> 14 <description>Utilities for Protocol Buffers</description> 15 16 <dependencies> 17 <dependency> 18 <groupId>${project.groupId}</groupId> 19 <artifactId>protobuf-java</artifactId> 20 </dependency> 21 <dependency> 22 <groupId>com.google.guava</groupId> 23 <artifactId>guava</artifactId> 24 </dependency> 25 <dependency> 26 <groupId>com.google.errorprone</groupId> 27 <artifactId>error_prone_annotations</artifactId> 28 <version>2.3.4</version> 29 </dependency> 30 <dependency> 31 <groupId>com.google.guava</groupId> 32 <artifactId>guava-testlib</artifactId> 33 <scope>test</scope> 34 </dependency> 35 <dependency> 36 <groupId>com.google.code.gson</groupId> 37 <artifactId>gson</artifactId> 38 <version>2.8.6</version> 39 </dependency> 40 <dependency> 41 <groupId>junit</groupId> 42 <artifactId>junit</artifactId> 43 </dependency> 44 <dependency> 45 <groupId>org.easymock</groupId> 46 <artifactId>easymock</artifactId> 47 </dependency> 48 <dependency> 49 <groupId>org.easymock</groupId> 50 <artifactId>easymockclassextension</artifactId> 51 </dependency> 52 <dependency> 53 <groupId>com.google.truth</groupId> 54 <artifactId>truth</artifactId> 55 <scope>test</scope> 56 </dependency> 57 </dependencies> 58 59 <properties> 60 <!-- Use the core proto dir so that we can call the core generation script --> 61 <test.proto.dir>../core/src/test/proto</test.proto.dir> 62 </properties> 63 64 <build> 65 <plugins> 66 <plugin> 67 <artifactId>maven-antrun-plugin</artifactId> 68 <executions> 69 <!-- Generate the test protos --> 70 <execution> 71 <id>generate-test-sources</id> 72 <phase>generate-test-sources</phase> 73 <configuration> 74 <target> 75 <!-- Generate all of the test protos from the core module --> 76 <ant antfile="../core/generate-test-sources-build.xml"/> 77 78 <!-- Generate additional test protos for this module --> 79 <exec executable="${protoc}"> 80 <arg value="--java_out=${generated.testsources.dir}"/> 81 <arg value="--proto_path=${protobuf.source.dir}"/> 82 <arg value="--proto_path=src/test/proto"/> 83 <arg value="src/test/proto/com/google/protobuf/util/json_test.proto"/> 84 </exec> 85 </target> 86 </configuration> 87 <goals> 88 <goal>run</goal> 89 </goals> 90 </execution> 91 </executions> 92 </plugin> 93 94 <!-- Add the generated test sources to the build --> 95 <plugin> 96 <groupId>org.codehaus.mojo</groupId> 97 <artifactId>build-helper-maven-plugin</artifactId> 98 <executions> 99 <execution> 100 <id>add-generated-test-sources</id> 101 <phase>generate-test-sources</phase> 102 <goals> 103 <goal>add-test-source</goal> 104 </goals> 105 <configuration> 106 <sources> 107 <source>${generated.testsources.dir}</source> 108 </sources> 109 </configuration> 110 </execution> 111 </executions> 112 </plugin> 113 114 <!-- Configure the OSGI bundle --> 115 <plugin> 116 <groupId>org.apache.felix</groupId> 117 <artifactId>maven-bundle-plugin</artifactId> 118 <extensions>true</extensions> 119 <configuration> 120 <instructions> 121 <Automatic-Module-Name>com.google.protobuf.util</Automatic-Module-Name> <!-- Java9+ Jigsaw module name --> 122 <Bundle-DocURL>https://developers.google.com/protocol-buffers/</Bundle-DocURL> 123 <Bundle-SymbolicName>com.google.protobuf.util</Bundle-SymbolicName> 124 <Export-Package>com.google.protobuf.util;version=${project.version}</Export-Package> 125 </instructions> 126 </configuration> 127 </plugin> 128 129 <!-- Configure the fat jar to include all dependencies --> 130 <plugin> 131 <artifactId>maven-assembly-plugin</artifactId> 132 <configuration> 133 <descriptorRefs> 134 <descriptorRef>jar-with-dependencies</descriptorRef> 135 </descriptorRefs> 136 </configuration> 137 </plugin> 138 </plugins> 139 </build> 140</project> 141