pom.xml 4.1 KB

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