pom.xml 9.5 KB

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