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.21.12</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.5.1</version> 29 </dependency> 30 <dependency> 31 <groupId>com.google.j2objc</groupId> 32 <artifactId>j2objc-annotations</artifactId> 33 <version>1.3</version> 34 </dependency> 35 <dependency> 36 <groupId>com.google.code.findbugs</groupId> 37 <artifactId>jsr305</artifactId> 38 <version>3.0.2</version> 39 </dependency> 40 <dependency> 41 <groupId>com.google.guava</groupId> 42 <artifactId>guava-testlib</artifactId> 43 <scope>test</scope> 44 </dependency> 45 <dependency> 46 <groupId>com.google.code.gson</groupId> 47 <artifactId>gson</artifactId> 48 <version>2.8.9</version> 49 </dependency> 50 <dependency> 51 <groupId>junit</groupId> 52 <artifactId>junit</artifactId> 53 </dependency> 54 <dependency> 55 <groupId>org.mockito</groupId> 56 <artifactId>mockito-core</artifactId> 57 <scope>test</scope> 58 </dependency> 59 <dependency> 60 <groupId>com.google.truth</groupId> 61 <artifactId>truth</artifactId> 62 <scope>test</scope> 63 </dependency> 64 </dependencies> 65 66 <properties> 67 <!-- Use the core proto dir so that we can call the core generation script --> 68 <test.proto.dir>../core/src/test/proto</test.proto.dir> 69 </properties> 70 71 <build> 72 <plugins> 73 <plugin> 74 <artifactId>maven-antrun-plugin</artifactId> 75 <executions> 76 <!-- Generate the test protos --> 77 <execution> 78 <id>generate-test-sources</id> 79 <phase>generate-test-sources</phase> 80 <configuration> 81 <target> 82 <!-- Generate all of the test protos from the core module --> 83 <ant antfile="../core/generate-test-sources-build.xml"/> 84 85 <!-- Generate additional test protos for this module --> 86 <exec executable="${protoc}"> 87 <arg value="--java_out=${generated.testsources.dir}"/> 88 <arg value="--proto_path=${protobuf.source.dir}"/> 89 <arg value="--proto_path=src/test/proto"/> 90 <arg value="src/test/proto/com/google/protobuf/util/json_test.proto"/> 91 </exec> 92 </target> 93 </configuration> 94 <goals> 95 <goal>run</goal> 96 </goals> 97 </execution> 98 </executions> 99 </plugin> 100 101 <!-- Add the generated test sources to the build --> 102 <plugin> 103 <groupId>org.codehaus.mojo</groupId> 104 <artifactId>build-helper-maven-plugin</artifactId> 105 <executions> 106 <execution> 107 <id>add-generated-test-sources</id> 108 <phase>generate-test-sources</phase> 109 <goals> 110 <goal>add-test-source</goal> 111 </goals> 112 <configuration> 113 <sources> 114 <source>${generated.testsources.dir}</source> 115 </sources> 116 </configuration> 117 </execution> 118 </executions> 119 </plugin> 120 121 <plugin> 122 <groupId>org.codehaus.mojo</groupId> 123 <artifactId>animal-sniffer-maven-plugin</artifactId> 124 <configuration> 125 <signature> 126 <groupId>net.sf.androidscents.signature</groupId> 127 <artifactId>android-api-level-19</artifactId> 128 <version>4.4.2_r4</version> 129 </signature> 130 </configuration> 131 <executions> 132 <execution> 133 <id>android</id> 134 <phase>test</phase> 135 <goals> 136 <goal>check</goal> 137 </goals> 138 </execution> 139 </executions> 140 </plugin> 141 <!-- Configure the OSGI bundle --> 142 <plugin> 143 <groupId>org.apache.felix</groupId> 144 <artifactId>maven-bundle-plugin</artifactId> 145 <extensions>true</extensions> 146 <configuration> 147 <instructions> 148 <Automatic-Module-Name>com.google.protobuf.util</Automatic-Module-Name> <!-- Java9+ Jigsaw module name --> 149 <Bundle-DocURL>https://developers.google.com/protocol-buffers/</Bundle-DocURL> 150 <Bundle-SymbolicName>com.google.protobuf.util</Bundle-SymbolicName> 151 <Export-Package>com.google.protobuf.util;version=${project.version}</Export-Package> 152 </instructions> 153 </configuration> 154 </plugin> 155 156 <!-- Configure the fat jar to include all dependencies --> 157 <plugin> 158 <artifactId>maven-assembly-plugin</artifactId> 159 <configuration> 160 <descriptorRefs> 161 <descriptorRef>jar-with-dependencies</descriptorRef> 162 </descriptorRefs> 163 </configuration> 164 </plugin> 165 </plugins> 166 </build> 167</project> 168