pom.xml 4.3 KB

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