pom.xml 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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/xsd/maven-4.0.0.xsd">
  3. <parent>
  4. <artifactId>pgv-java</artifactId>
  5. <groupId>io.envoyproxy.protoc-gen-validate</groupId>
  6. <version>0.6.2-SNAPSHOT</version>
  7. </parent>
  8. <modelVersion>4.0.0</modelVersion>
  9. <artifactId>pgv-java-validation</artifactId>
  10. <name>PGV-Java Validation Harness</name>
  11. <properties>
  12. <skipNexusStagingDeployMojo>true</skipNexusStagingDeployMojo>
  13. </properties>
  14. <dependencies>
  15. <dependency>
  16. <groupId>io.envoyproxy.protoc-gen-validate</groupId>
  17. <artifactId>pgv-java-stub</artifactId>
  18. <version>${project.version}</version>
  19. </dependency>
  20. <dependency>
  21. <groupId>com.google.protobuf</groupId>
  22. <artifactId>protobuf-java</artifactId>
  23. <version>${google.protobuf.version}</version>
  24. </dependency>
  25. <!-- Depend on artifacts to ensure they are built before this module -->
  26. <dependency>
  27. <groupId>io.envoyproxy.protoc-gen-validate</groupId>
  28. <artifactId>protoc-gen-validate</artifactId>
  29. <version>${project.version}</version>
  30. <type>pom</type>
  31. </dependency>
  32. </dependencies>
  33. <build>
  34. <extensions>
  35. <extension>
  36. <groupId>kr.motd.maven</groupId>
  37. <artifactId>os-maven-plugin</artifactId>
  38. <version>1.4.1.Final</version>
  39. </extension>
  40. </extensions>
  41. <plugins>
  42. <plugin>
  43. <groupId>org.xolstice.maven.plugins</groupId>
  44. <artifactId>protobuf-maven-plugin</artifactId>
  45. <version>0.5.0</version>
  46. <configuration>
  47. <protocArtifact>com.google.protobuf:protoc:${protoc.version}:exe:${os.detected.classifier}</protocArtifact>
  48. </configuration>
  49. <executions>
  50. <!-- Generate PGV harness protos -->
  51. <execution>
  52. <id>protoc-java</id>
  53. <goals>
  54. <goal>compile</goal>
  55. </goals>
  56. <configuration>
  57. <protoSourceRoot>../../</protoSourceRoot>
  58. <includes>
  59. <include>tests/harness/harness.proto</include>
  60. <include>tests/harness/cases/*.proto</include>
  61. <include>tests/harness/cases/other_package/*.proto</include>
  62. </includes>
  63. </configuration>
  64. </execution>
  65. <execution>
  66. <id>protoc-java-pgv</id>
  67. <goals>
  68. <goal>compile-custom</goal>
  69. </goals>
  70. <configuration>
  71. <protoSourceRoot>../../</protoSourceRoot>
  72. <pluginParameter>lang=java</pluginParameter>
  73. <includes>
  74. <include>tests/harness/cases/*.proto</include>
  75. <include>tests/harness/cases/other_package/*.proto</include>
  76. </includes>
  77. <pluginId>java-pgv</pluginId>
  78. <pluginArtifact>io.envoyproxy.protoc-gen-validate:protoc-gen-validate:${project.version}:exe:${os.detected.classifier}</pluginArtifact>
  79. </configuration>
  80. </execution>
  81. </executions>
  82. </plugin>
  83. <plugin>
  84. <groupId>org.apache.maven.plugins</groupId>
  85. <artifactId>maven-shade-plugin</artifactId>
  86. <version>3.2.0</version>
  87. <executions>
  88. <execution>
  89. <phase>package</phase>
  90. <goals>
  91. <goal>shade</goal>
  92. </goals>
  93. <configuration>
  94. <finalName>java-harness</finalName>
  95. <transformers>
  96. <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
  97. <manifestEntries>
  98. <Main-Class>io.envoyproxy.pgv.validation.JavaHarness</Main-Class>
  99. </manifestEntries>
  100. </transformer>
  101. </transformers>
  102. </configuration>
  103. </execution>
  104. </executions>
  105. </plugin>
  106. </plugins>
  107. </build>
  108. </project>