pom.xml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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.8.0-rc-1</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.3.2</version>
  26. </dependency>
  27. <dependency>
  28. <groupId>com.google.guava</groupId>
  29. <artifactId>guava-testlib</artifactId>
  30. <scope>test</scope>
  31. </dependency>
  32. <dependency>
  33. <groupId>com.google.code.gson</groupId>
  34. <artifactId>gson</artifactId>
  35. <version>2.7</version>
  36. </dependency>
  37. <dependency>
  38. <groupId>junit</groupId>
  39. <artifactId>junit</artifactId>
  40. </dependency>
  41. <dependency>
  42. <groupId>org.easymock</groupId>
  43. <artifactId>easymock</artifactId>
  44. </dependency>
  45. <dependency>
  46. <groupId>org.easymock</groupId>
  47. <artifactId>easymockclassextension</artifactId>
  48. </dependency>
  49. </dependencies>
  50. <properties>
  51. <!-- Use the core proto dir so that we can call the core generation script -->
  52. <test.proto.dir>../core/src/test/proto</test.proto.dir>
  53. </properties>
  54. <build>
  55. <plugins>
  56. <plugin>
  57. <artifactId>maven-antrun-plugin</artifactId>
  58. <executions>
  59. <!-- Generate the test protos -->
  60. <execution>
  61. <id>generate-test-sources</id>
  62. <phase>generate-test-sources</phase>
  63. <configuration>
  64. <target>
  65. <!-- Generate all of the test protos from the core module -->
  66. <ant antfile="../core/generate-test-sources-build.xml"/>
  67. <!-- Generate additional test protos for this module -->
  68. <exec executable="${protoc}">
  69. <arg value="--java_out=${generated.testsources.dir}"/>
  70. <arg value="--proto_path=${protobuf.source.dir}"/>
  71. <arg value="--proto_path=src/test/proto"/>
  72. <arg value="src/test/proto/com/google/protobuf/util/json_test.proto"/>
  73. </exec>
  74. </target>
  75. </configuration>
  76. <goals>
  77. <goal>run</goal>
  78. </goals>
  79. </execution>
  80. </executions>
  81. </plugin>
  82. <!-- Add the generated test sources to the build -->
  83. <plugin>
  84. <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>
  100. </plugin>
  101. <!-- Configure the OSGI bundle -->
  102. <plugin>
  103. <groupId>org.apache.felix</groupId>
  104. <artifactId>maven-bundle-plugin</artifactId>
  105. <extensions>true</extensions>
  106. <configuration>
  107. <instructions>
  108. <Bundle-DocURL>https://developers.google.com/protocol-buffers/</Bundle-DocURL>
  109. <Bundle-SymbolicName>com.google.protobuf.util</Bundle-SymbolicName>
  110. <Export-Package>com.google.protobuf.util;version=${project.version}</Export-Package>
  111. </instructions>
  112. </configuration>
  113. </plugin>
  114. <!-- Configure the fat jar to include all dependencies -->
  115. <plugin>
  116. <artifactId>maven-assembly-plugin</artifactId>
  117. <configuration>
  118. <descriptorRefs>
  119. <descriptorRef>jar-with-dependencies</descriptorRef>
  120. </descriptorRefs>
  121. </configuration>
  122. </plugin>
  123. </plugins>
  124. </build>
  125. </project>