pom.xml 4.6 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-stub</artifactId>
  10. <name>PGV-Java Stubs</name>
  11. <dependencies>
  12. <dependency>
  13. <groupId>com.google.re2j</groupId>
  14. <artifactId>re2j</artifactId>
  15. <version>${re2j.version}</version>
  16. </dependency>
  17. <dependency>
  18. <groupId>commons-validator</groupId>
  19. <artifactId>commons-validator</artifactId>
  20. <version>${commons.validator.version}</version>
  21. <exclusions>
  22. <exclusion>
  23. <groupId>*</groupId>
  24. <artifactId>*</artifactId>
  25. </exclusion>
  26. </exclusions>
  27. </dependency>
  28. <dependency>
  29. <groupId>com.google.protobuf</groupId>
  30. <artifactId>protobuf-java</artifactId>
  31. <version>${google.protobuf.version}</version>
  32. </dependency>
  33. <dependency>
  34. <groupId>com.google.protobuf</groupId>
  35. <artifactId>protobuf-java-util</artifactId>
  36. <version>${google.protobuf.version}</version>
  37. </dependency>
  38. <!-- Depend on artifacts to ensure they are built before this module -->
  39. <dependency>
  40. <groupId>io.envoyproxy.protoc-gen-validate</groupId>
  41. <artifactId>protoc-gen-validate</artifactId>
  42. <version>${project.version}</version>
  43. <type>pom</type>
  44. <scope>test</scope>
  45. </dependency>
  46. </dependencies>
  47. <build>
  48. <resources>
  49. <resource>
  50. <directory>../..</directory>
  51. <includes>
  52. <include>validate/validate.proto</include>
  53. </includes>
  54. </resource>
  55. </resources>
  56. <extensions>
  57. <extension>
  58. <groupId>kr.motd.maven</groupId>
  59. <artifactId>os-maven-plugin</artifactId>
  60. <version>1.4.1.Final</version>
  61. </extension>
  62. </extensions>
  63. <plugins>
  64. <plugin>
  65. <groupId>org.xolstice.maven.plugins</groupId>
  66. <artifactId>protobuf-maven-plugin</artifactId>
  67. <version>0.5.0</version>
  68. <configuration>
  69. <!--
  70. ~ Embed generated validate.proto classes for all Protobuf 3.x versions. This is safe because
  71. ~ Protobuf guarantees API stability for all 3.x version.
  72. ~ https://github.com/protocolbuffers/protobuf/blob/17cc42a45aeab0f78a137fa6be6c36095db32e58/CHANGES.txt#L107-L122
  73. -->
  74. <protocArtifact>com.google.protobuf:protoc:3.0.0:exe:${os.detected.classifier}</protocArtifact>
  75. </configuration>
  76. <executions>
  77. <execution>
  78. <id>protoc-java-pgv</id>
  79. <goals>
  80. <goal>compile</goal>
  81. </goals>
  82. <configuration>
  83. <protoSourceRoot>../../</protoSourceRoot>
  84. <includes>
  85. <include>validate/*.proto</include>
  86. </includes>
  87. </configuration>
  88. </execution>
  89. <execution>
  90. <id>protoc-java</id>
  91. <goals>
  92. <goal>test-compile</goal>
  93. </goals>
  94. </execution>
  95. <execution>
  96. <id>test-protoc-java-pgv</id>
  97. <goals>
  98. <goal>test-compile-custom</goal>
  99. </goals>
  100. <configuration>
  101. <pluginParameter>lang=java</pluginParameter>
  102. <pluginId>java-pgv</pluginId>
  103. <pluginArtifact>io.envoyproxy.protoc-gen-validate:protoc-gen-validate:${project.version}:exe:${os.detected.classifier}</pluginArtifact>
  104. </configuration>
  105. </execution>
  106. </executions>
  107. </plugin>
  108. </plugins>
  109. </build>
  110. </project>