pom.xml 4.9 KB

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