pom.xml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License. See accompanying LICENSE file.
  12. -->
  13. <project xmlns="http://maven.apache.org/POM/4.0.0"
  14. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  15. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  16. <parent>
  17. <artifactId>hadoop-yarn</artifactId>
  18. <groupId>org.apache.hadoop</groupId>
  19. <version>3.5.0-SNAPSHOT</version>
  20. </parent>
  21. <modelVersion>4.0.0</modelVersion>
  22. <artifactId>hadoop-yarn-csi</artifactId>
  23. <name>Apache Hadoop YARN CSI</name>
  24. <packaging>jar</packaging>
  25. <properties>
  26. <grpc.version>1.53.0</grpc.version>
  27. <animal-sniffer.version>1.21</animal-sniffer.version>
  28. </properties>
  29. <dependencies>
  30. <dependency>
  31. <groupId>org.apache.hadoop.thirdparty</groupId>
  32. <artifactId>hadoop-shaded-guava</artifactId>
  33. </dependency>
  34. <dependency>
  35. <groupId>com.google.protobuf</groupId>
  36. <artifactId>protobuf-java</artifactId>
  37. <version>${hadoop.protobuf.version}</version>
  38. <scope>${transient.protobuf2.scope}</scope>
  39. </dependency>
  40. <dependency>
  41. <groupId>io.netty</groupId>
  42. <artifactId>netty-all</artifactId>
  43. </dependency>
  44. <dependency>
  45. <groupId>io.grpc</groupId>
  46. <artifactId>grpc-core</artifactId>
  47. <version>${grpc.version}</version>
  48. <exclusions>
  49. <exclusion>
  50. <groupId>org.codehaus.mojo</groupId>
  51. <artifactId>animal-sniffer-annotations</artifactId>
  52. </exclusion>
  53. </exclusions>
  54. </dependency>
  55. <dependency>
  56. <groupId>org.codehaus.mojo</groupId>
  57. <artifactId>animal-sniffer-annotations</artifactId>
  58. <version>${animal-sniffer.version}</version>
  59. </dependency>
  60. <dependency>
  61. <groupId>io.grpc</groupId>
  62. <artifactId>grpc-protobuf</artifactId>
  63. <version>${grpc.version}</version>
  64. <exclusions>
  65. <!-- Exclude protobuf-java 2.5.0 -->
  66. <exclusion>
  67. <groupId>com.google.protobuf</groupId>
  68. <artifactId>protobuf-java</artifactId>
  69. </exclusion>
  70. </exclusions>
  71. </dependency>
  72. <dependency>
  73. <groupId>io.grpc</groupId>
  74. <artifactId>grpc-stub</artifactId>
  75. <version>${grpc.version}</version>
  76. </dependency>
  77. <dependency>
  78. <groupId>io.grpc</groupId>
  79. <artifactId>grpc-netty</artifactId>
  80. <version>${grpc.version}</version>
  81. <exclusions>
  82. <!-- Contained in netty-all. skip -->
  83. <exclusion>
  84. <groupId>io.netty</groupId>
  85. <artifactId>netty-codec-http2</artifactId>
  86. </exclusion>
  87. <!-- Contained in netty-all. skip -->
  88. <exclusion>
  89. <groupId>io.netty</groupId>
  90. <artifactId>netty-handler-proxy</artifactId>
  91. </exclusion>
  92. </exclusions>
  93. </dependency>
  94. <dependency>
  95. <groupId>junit</groupId>
  96. <artifactId>junit</artifactId>
  97. </dependency>
  98. <dependency>
  99. <groupId>org.assertj</groupId>
  100. <artifactId>assertj-core</artifactId>
  101. <scope>test</scope>
  102. </dependency>
  103. <dependency>
  104. <groupId>org.junit.jupiter</groupId>
  105. <artifactId>junit-jupiter-api</artifactId>
  106. <scope>test</scope>
  107. </dependency>
  108. <dependency>
  109. <groupId>org.junit.jupiter</groupId>
  110. <artifactId>junit-jupiter-engine</artifactId>
  111. <scope>test</scope>
  112. </dependency>
  113. <dependency>
  114. <groupId>org.apache.hadoop</groupId>
  115. <artifactId>hadoop-common</artifactId>
  116. <type>test-jar</type>
  117. <scope>test</scope>
  118. <exclusions>
  119. <!-- Exclude protobuf-java 2.5.0 -->
  120. <exclusion>
  121. <groupId>com.google.protobuf</groupId>
  122. <artifactId>protobuf-java</artifactId>
  123. </exclusion>
  124. </exclusions>
  125. </dependency>
  126. <dependency>
  127. <groupId>org.apache.hadoop</groupId>
  128. <artifactId>hadoop-common</artifactId>
  129. <scope>provided</scope>
  130. <exclusions>
  131. <!-- Exclude protobuf-java 2.5.0 -->
  132. <exclusion>
  133. <groupId>com.google.protobuf</groupId>
  134. <artifactId>protobuf-java</artifactId>
  135. </exclusion>
  136. </exclusions>
  137. </dependency>
  138. <dependency>
  139. <groupId>org.apache.hadoop</groupId>
  140. <artifactId>hadoop-yarn-common</artifactId>
  141. <scope>provided</scope>
  142. <exclusions>
  143. <!-- Exclude protobuf-java 2.5.0 -->
  144. <exclusion>
  145. <groupId>com.google.protobuf</groupId>
  146. <artifactId>protobuf-java</artifactId>
  147. </exclusion>
  148. </exclusions>
  149. </dependency>
  150. <dependency>
  151. <groupId>org.apache.hadoop</groupId>
  152. <artifactId>hadoop-yarn-api</artifactId>
  153. <scope>provided</scope>
  154. <exclusions>
  155. <!-- Exclude protobuf-java 2.5.0 -->
  156. <exclusion>
  157. <groupId>com.google.protobuf</groupId>
  158. <artifactId>protobuf-java</artifactId>
  159. </exclusion>
  160. </exclusions>
  161. </dependency>
  162. <dependency>
  163. <groupId>javax.annotation</groupId>
  164. <artifactId>javax.annotation-api</artifactId>
  165. <scope>compile</scope>
  166. </dependency>
  167. </dependencies>
  168. <build>
  169. <plugins>
  170. <plugin>
  171. <groupId>org.apache.maven.plugins</groupId>
  172. <artifactId>maven-dependency-plugin</artifactId>
  173. <executions>
  174. <execution>
  175. <phase>package</phase>
  176. <goals>
  177. <goal>copy-dependencies</goal>
  178. </goals>
  179. <configuration>
  180. <includeScope>runtime</includeScope>
  181. <outputDirectory>${project.build.directory}/lib</outputDirectory>
  182. </configuration>
  183. </execution>
  184. </executions>
  185. </plugin>
  186. <plugin>
  187. <groupId>org.apache.maven.plugins</groupId>
  188. <artifactId>maven-compiler-plugin</artifactId>
  189. </plugin>
  190. <plugin>
  191. <artifactId>maven-clean-plugin</artifactId>
  192. <configuration>
  193. <filesets>
  194. <fileset>
  195. <directory>target/</directory>
  196. </fileset>
  197. </filesets>
  198. </configuration>
  199. </plugin>
  200. <plugin>
  201. <groupId>org.xolstice.maven.plugins</groupId>
  202. <artifactId>protobuf-maven-plugin</artifactId>
  203. <version>${protobuf-maven-plugin.version}</version>
  204. <configuration>
  205. <protocArtifact>com.google.protobuf:protoc:${hadoop.protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
  206. <pluginId>grpc-java</pluginId>
  207. <pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}</pluginArtifact>
  208. </configuration>
  209. <executions>
  210. <execution>
  211. <goals>
  212. <goal>compile</goal>
  213. <goal>compile-custom</goal>
  214. </goals>
  215. </execution>
  216. </executions>
  217. </plugin>
  218. <plugin>
  219. <groupId>org.apache.rat</groupId>
  220. <artifactId>apache-rat-plugin</artifactId>
  221. <configuration>
  222. <excludes>
  223. <exclude>target/generated-sources/**</exclude>
  224. <exclude>target/surefire-reports/**</exclude>
  225. <exclude>target/protoc-dependencies/**</exclude>
  226. </excludes>
  227. </configuration>
  228. </plugin>
  229. <plugin>
  230. <groupId>org.apache.maven.plugins</groupId>
  231. <artifactId>maven-javadoc-plugin</artifactId>
  232. <configuration>
  233. <excludePackageNames>csi.v0</excludePackageNames>
  234. </configuration>
  235. </plugin>
  236. <plugin>
  237. <groupId>org.codehaus.mojo</groupId>
  238. <artifactId>build-helper-maven-plugin</artifactId>
  239. <executions>
  240. <execution>
  241. <id>add-source</id>
  242. <phase>generate-sources</phase>
  243. <goals>
  244. <goal>add-source</goal>
  245. </goals>
  246. <configuration>
  247. <sources>
  248. <source>${basedir}/target/generated-sources/protobuf/java</source>
  249. </sources>
  250. </configuration>
  251. </execution>
  252. </executions>
  253. </plugin>
  254. </plugins>
  255. </build>
  256. </project>