pom.xml 4.3 KB

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