pom.xml 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  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.3.9-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.26.0</grpc.version>
  27. </properties>
  28. <dependencies>
  29. <dependency>
  30. <groupId>org.apache.hadoop.thirdparty</groupId>
  31. <artifactId>hadoop-shaded-guava</artifactId>
  32. </dependency>
  33. <dependency>
  34. <groupId>com.google.protobuf</groupId>
  35. <artifactId>protobuf-java</artifactId>
  36. <version>${hadoop.protobuf.version}</version>
  37. </dependency>
  38. <dependency>
  39. <groupId>io.netty</groupId>
  40. <artifactId>netty-all</artifactId>
  41. </dependency>
  42. <dependency>
  43. <groupId>io.grpc</groupId>
  44. <artifactId>grpc-core</artifactId>
  45. <version>${grpc.version}</version>
  46. </dependency>
  47. <dependency>
  48. <groupId>io.grpc</groupId>
  49. <artifactId>grpc-protobuf</artifactId>
  50. <version>${grpc.version}</version>
  51. <exclusions>
  52. <!-- Exclude protobuf-java 2.5.0 -->
  53. <exclusion>
  54. <groupId>com.google.protobuf</groupId>
  55. <artifactId>protobuf-java</artifactId>
  56. </exclusion>
  57. </exclusions>
  58. </dependency>
  59. <dependency>
  60. <groupId>io.grpc</groupId>
  61. <artifactId>grpc-stub</artifactId>
  62. <version>${grpc.version}</version>
  63. </dependency>
  64. <dependency>
  65. <groupId>io.grpc</groupId>
  66. <artifactId>grpc-netty</artifactId>
  67. <version>${grpc.version}</version>
  68. <exclusions>
  69. <!-- Contained in netty-all. skip -->
  70. <exclusion>
  71. <groupId>io.netty</groupId>
  72. <artifactId>netty-codec-http2</artifactId>
  73. </exclusion>
  74. <!-- Contained in netty-all. skip -->
  75. <exclusion>
  76. <groupId>io.netty</groupId>
  77. <artifactId>netty-handler-proxy</artifactId>
  78. </exclusion>
  79. </exclusions>
  80. </dependency>
  81. <dependency>
  82. <groupId>junit</groupId>
  83. <artifactId>junit</artifactId>
  84. </dependency>
  85. <dependency>
  86. <groupId>org.assertj</groupId>
  87. <artifactId>assertj-core</artifactId>
  88. <scope>test</scope>
  89. </dependency>
  90. <dependency>
  91. <groupId>org.apache.hadoop</groupId>
  92. <artifactId>hadoop-common</artifactId>
  93. <type>test-jar</type>
  94. <scope>test</scope>
  95. <exclusions>
  96. <!-- Exclude protobuf-java 2.5.0 -->
  97. <exclusion>
  98. <groupId>com.google.protobuf</groupId>
  99. <artifactId>protobuf-java</artifactId>
  100. </exclusion>
  101. </exclusions>
  102. </dependency>
  103. <dependency>
  104. <groupId>org.apache.hadoop</groupId>
  105. <artifactId>hadoop-common</artifactId>
  106. <scope>provided</scope>
  107. <exclusions>
  108. <!-- Exclude protobuf-java 2.5.0 -->
  109. <exclusion>
  110. <groupId>com.google.protobuf</groupId>
  111. <artifactId>protobuf-java</artifactId>
  112. </exclusion>
  113. </exclusions>
  114. </dependency>
  115. <dependency>
  116. <groupId>org.apache.hadoop</groupId>
  117. <artifactId>hadoop-yarn-common</artifactId>
  118. <scope>provided</scope>
  119. <exclusions>
  120. <!-- Exclude protobuf-java 2.5.0 -->
  121. <exclusion>
  122. <groupId>com.google.protobuf</groupId>
  123. <artifactId>protobuf-java</artifactId>
  124. </exclusion>
  125. </exclusions>
  126. </dependency>
  127. <dependency>
  128. <groupId>org.apache.hadoop</groupId>
  129. <artifactId>hadoop-yarn-api</artifactId>
  130. <scope>provided</scope>
  131. <exclusions>
  132. <!-- Exclude protobuf-java 2.5.0 -->
  133. <exclusion>
  134. <groupId>com.google.protobuf</groupId>
  135. <artifactId>protobuf-java</artifactId>
  136. </exclusion>
  137. </exclusions>
  138. </dependency>
  139. <dependency>
  140. <groupId>javax.annotation</groupId>
  141. <artifactId>javax.annotation-api</artifactId>
  142. <scope>compile</scope>
  143. </dependency>
  144. </dependencies>
  145. <build>
  146. <plugins>
  147. <plugin>
  148. <groupId>org.apache.maven.plugins</groupId>
  149. <artifactId>maven-dependency-plugin</artifactId>
  150. <executions>
  151. <execution>
  152. <phase>package</phase>
  153. <goals>
  154. <goal>copy-dependencies</goal>
  155. </goals>
  156. <configuration>
  157. <includeScope>runtime</includeScope>
  158. <outputDirectory>${project.build.directory}/lib</outputDirectory>
  159. </configuration>
  160. </execution>
  161. </executions>
  162. </plugin>
  163. <plugin>
  164. <groupId>org.apache.maven.plugins</groupId>
  165. <artifactId>maven-compiler-plugin</artifactId>
  166. </plugin>
  167. <plugin>
  168. <artifactId>maven-clean-plugin</artifactId>
  169. <configuration>
  170. <filesets>
  171. <fileset>
  172. <directory>target/</directory>
  173. </fileset>
  174. </filesets>
  175. </configuration>
  176. </plugin>
  177. <plugin>
  178. <groupId>org.xolstice.maven.plugins</groupId>
  179. <artifactId>protobuf-maven-plugin</artifactId>
  180. <version>${protobuf-maven-plugin.version}</version>
  181. <configuration>
  182. <protocArtifact>com.google.protobuf:protoc:${hadoop.protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
  183. <pluginId>grpc-java</pluginId>
  184. <pluginArtifact>io.grpc:protoc-gen-grpc-java:1.26.0:exe:${os.detected.classifier}</pluginArtifact>
  185. </configuration>
  186. <executions>
  187. <execution>
  188. <goals>
  189. <goal>compile</goal>
  190. <goal>compile-custom</goal>
  191. </goals>
  192. </execution>
  193. </executions>
  194. </plugin>
  195. <plugin>
  196. <groupId>org.apache.rat</groupId>
  197. <artifactId>apache-rat-plugin</artifactId>
  198. <configuration>
  199. <excludes>
  200. <exclude>target/generated-sources/**</exclude>
  201. <exclude>target/surefire-reports/**</exclude>
  202. <exclude>target/protoc-dependencies/**</exclude>
  203. </excludes>
  204. </configuration>
  205. </plugin>
  206. <plugin>
  207. <groupId>org.apache.maven.plugins</groupId>
  208. <artifactId>maven-javadoc-plugin</artifactId>
  209. <configuration>
  210. <excludePackageNames>csi.v0</excludePackageNames>
  211. </configuration>
  212. </plugin>
  213. <plugin>
  214. <groupId>org.codehaus.mojo</groupId>
  215. <artifactId>build-helper-maven-plugin</artifactId>
  216. <executions>
  217. <execution>
  218. <id>add-source</id>
  219. <phase>generate-sources</phase>
  220. <goals>
  221. <goal>add-source</goal>
  222. </goals>
  223. <configuration>
  224. <sources>
  225. <source>${basedir}/target/generated-sources/protobuf/java</source>
  226. </sources>
  227. </configuration>
  228. </execution>
  229. </executions>
  230. </plugin>
  231. </plugins>
  232. </build>
  233. </project>