pom.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  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" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  14. <modelVersion>4.0.0</modelVersion>
  15. <parent>
  16. <groupId>org.apache.hadoop</groupId>
  17. <artifactId>hadoop-project</artifactId>
  18. <version>3.5.0-SNAPSHOT</version>
  19. <relativePath>../hadoop-project</relativePath>
  20. </parent>
  21. <artifactId>hadoop-yarn-project</artifactId>
  22. <version>3.5.0-SNAPSHOT</version>
  23. <packaging>pom</packaging>
  24. <name>Apache Hadoop YARN Project</name>
  25. <url>https://hadoop.apache.org/yarn/</url>
  26. <properties>
  27. <test.logs>true</test.logs>
  28. <test.timeout>600000</test.timeout>
  29. <fork.mode>once</fork.mode>
  30. <hadoop.component>yarn</hadoop.component>
  31. <is.hadoop.component>true</is.hadoop.component>
  32. <yarn.ui.packaging>pom</yarn.ui.packaging>
  33. </properties>
  34. <modules>
  35. <module>hadoop-yarn</module>
  36. </modules>
  37. <!--
  38. Do not add 3rd party dependencies here, add them to the POM of the leaf module.
  39. The dependencies in this module are for the assembly plugin, packaging purposes.
  40. -->
  41. <dependencies>
  42. <dependency>
  43. <groupId>org.apache.hadoop</groupId>
  44. <artifactId>hadoop-yarn-api</artifactId>
  45. </dependency>
  46. <dependency>
  47. <groupId>org.apache.hadoop</groupId>
  48. <artifactId>hadoop-yarn-client</artifactId>
  49. </dependency>
  50. <dependency>
  51. <groupId>org.apache.hadoop</groupId>
  52. <artifactId>hadoop-yarn-common</artifactId>
  53. </dependency>
  54. <dependency>
  55. <groupId>org.apache.hadoop</groupId>
  56. <artifactId>hadoop-yarn-server-common</artifactId>
  57. </dependency>
  58. <dependency>
  59. <groupId>org.apache.hadoop</groupId>
  60. <artifactId>hadoop-yarn-server-nodemanager</artifactId>
  61. </dependency>
  62. <dependency>
  63. <groupId>org.apache.hadoop</groupId>
  64. <artifactId>hadoop-yarn-server-resourcemanager</artifactId>
  65. </dependency>
  66. <dependency>
  67. <groupId>org.apache.hadoop</groupId>
  68. <artifactId>hadoop-yarn-server-web-proxy</artifactId>
  69. </dependency>
  70. <dependency>
  71. <groupId>org.apache.hadoop</groupId>
  72. <artifactId>hadoop-yarn-server-router</artifactId>
  73. </dependency>
  74. <dependency>
  75. <groupId>org.apache.hadoop</groupId>
  76. <artifactId>hadoop-yarn-server-globalpolicygenerator</artifactId>
  77. </dependency>
  78. <dependency>
  79. <groupId>org.apache.hadoop</groupId>
  80. <artifactId>hadoop-yarn-services-core</artifactId>
  81. </dependency>
  82. <dependency>
  83. <groupId>org.apache.hadoop</groupId>
  84. <artifactId>hadoop-yarn-applications-catalog-webapp</artifactId>
  85. <type>war</type>
  86. </dependency>
  87. <dependency>
  88. <groupId>org.apache.hadoop</groupId>
  89. <artifactId>hadoop-yarn-applications-distributedshell</artifactId>
  90. <scope>provided</scope>
  91. </dependency>
  92. <dependency>
  93. <groupId>org.apache.hadoop</groupId>
  94. <artifactId>hadoop-yarn-applications-unmanaged-am-launcher</artifactId>
  95. <version>${project.version}</version>
  96. <scope>provided</scope>
  97. </dependency>
  98. <dependency>
  99. <groupId>org.apache.hadoop</groupId>
  100. <artifactId>hadoop-yarn-server-tests</artifactId>
  101. <version>${project.version}</version>
  102. <scope>provided</scope>
  103. </dependency>
  104. <dependency>
  105. <groupId>org.apache.hadoop</groupId>
  106. <artifactId>hadoop-yarn-server-timelineservice-hbase-client</artifactId>
  107. <version>${project.version}</version>
  108. <scope>provided</scope>
  109. <exclusions>
  110. <exclusion>
  111. <groupId>com.google.errorprone</groupId>
  112. <artifactId>error_prone_annotations</artifactId>
  113. </exclusion>
  114. <exclusion>
  115. <groupId>org.codehaus.mojo</groupId>
  116. <artifactId>animal-sniffer-annotations</artifactId>
  117. </exclusion>
  118. </exclusions>
  119. </dependency>
  120. <dependency>
  121. <groupId>org.apache.hadoop</groupId>
  122. <artifactId>hadoop-yarn-csi</artifactId>
  123. <version>${project.version}</version>
  124. <scope>provided</scope>
  125. </dependency>
  126. <dependency>
  127. <groupId>org.apache.hadoop</groupId>
  128. <artifactId>hadoop-yarn-server-timelineservice-documentstore</artifactId>
  129. <version>${project.version}</version>
  130. <scope>provided</scope>
  131. </dependency>
  132. <dependency>
  133. <groupId>org.apache.hadoop</groupId>
  134. <artifactId>hadoop-yarn-server-timelineservice-hbase-tests</artifactId>
  135. <version>${project.version}</version>
  136. <scope>provided</scope>
  137. </dependency>
  138. <dependency>
  139. <groupId>org.apache.hadoop</groupId>
  140. <artifactId>hadoop-yarn-ui</artifactId>
  141. <version>${project.version}</version>
  142. <type>${yarn.ui.packaging}</type>
  143. <scope>provided</scope>
  144. </dependency>
  145. </dependencies>
  146. <build>
  147. <plugins>
  148. <plugin>
  149. <artifactId>maven-antrun-plugin</artifactId>
  150. <executions>
  151. <execution>
  152. <id>tar</id>
  153. <phase>package</phase>
  154. <goals>
  155. <goal>run</goal>
  156. </goals>
  157. <configuration>
  158. <!-- this is identical from hadoop-project-dist, eventually they must be unified -->
  159. <target if="tar">
  160. <!-- Using Unix script to preserve symlinks -->
  161. <echo file="${project.build.directory}/dist-maketar.sh">
  162. cd "${project.build.directory}"
  163. tar cf - ${project.artifactId}-${project.version} | gzip > ${project.artifactId}-${project.version}.tar.gz
  164. </echo>
  165. <exec executable="${shell-executable}" dir="${project.build.directory}" failonerror="true">
  166. <arg line="./dist-maketar.sh"/>
  167. </exec>
  168. </target>
  169. </configuration>
  170. </execution>
  171. </executions>
  172. </plugin>
  173. </plugins>
  174. </build>
  175. <profiles>
  176. <profile>
  177. <id>yarn-ui</id>
  178. <properties>
  179. <yarn.ui.packaging>war</yarn.ui.packaging>
  180. </properties>
  181. </profile>
  182. <profile>
  183. <id>hbase1</id>
  184. <dependencies>
  185. <dependency>
  186. <groupId>org.apache.hadoop</groupId>
  187. <artifactId>hadoop-yarn-server-timelineservice-hbase-server-1</artifactId>
  188. <version>${project.version}</version>
  189. </dependency>
  190. </dependencies>
  191. </profile>
  192. <profile>
  193. <id>hbase2</id>
  194. <dependencies>
  195. <dependency>
  196. <groupId>org.apache.hadoop</groupId>
  197. <artifactId>hadoop-yarn-server-timelineservice-hbase-server-2</artifactId>
  198. <version>${project.version}</version>
  199. </dependency>
  200. </dependencies>
  201. </profile>
  202. <profile>
  203. <id>dist</id>
  204. <activation>
  205. <activeByDefault>false</activeByDefault>
  206. </activation>
  207. <build>
  208. <plugins>
  209. <plugin>
  210. <artifactId>maven-source-plugin</artifactId>
  211. <executions>
  212. <execution>
  213. <id>attach-sources</id>
  214. <goals>
  215. <!-- avoid warning about recursion -->
  216. <goal>jar-no-fork</goal>
  217. </goals>
  218. </execution>
  219. </executions>
  220. </plugin>
  221. <plugin>
  222. <groupId>org.apache.maven.plugins</groupId>
  223. <artifactId>maven-assembly-plugin</artifactId>
  224. <dependencies>
  225. <dependency>
  226. <groupId>org.apache.hadoop</groupId>
  227. <artifactId>hadoop-assemblies</artifactId>
  228. <version>${project.version}</version>
  229. </dependency>
  230. </dependencies>
  231. <configuration>
  232. <tarLongFileMode>gnu</tarLongFileMode>
  233. <appendAssemblyId>false</appendAssemblyId>
  234. <attach>false</attach>
  235. <finalName>${project.artifactId}-${project.version}</finalName>
  236. <descriptorRefs>
  237. <descriptorRef>hadoop-yarn-dist</descriptorRef>
  238. </descriptorRefs>
  239. </configuration>
  240. <executions>
  241. <execution>
  242. <id>package-yarn</id>
  243. <phase>prepare-package</phase>
  244. <goals>
  245. <goal>single</goal>
  246. </goals>
  247. </execution>
  248. </executions>
  249. </plugin>
  250. <!-- Remove duplicate dependencies which exist in both yarn/lib folder and yarn/timelineservice/lib folder -->
  251. <plugin>
  252. <groupId>org.apache.maven.plugins</groupId>
  253. <artifactId>maven-antrun-plugin</artifactId>
  254. <executions>
  255. <execution>
  256. <id>dist</id>
  257. <phase>prepare-package</phase>
  258. <goals>
  259. <goal>run</goal>
  260. </goals>
  261. <configuration>
  262. <target>
  263. <echo file="${project.build.directory}/remove-duplicate-timelineservice-jars.sh">
  264. yarnjardir="${project.build.directory}/${project.artifactId}-${project.version}/share/hadoop/yarn"
  265. yarnlibdir="${yarnjardir}/lib/"
  266. cd "${yarnjardir}/timelineservice/lib"
  267. for jar in `ls`
  268. do
  269. if [ -f "${yarnlibdir}""${jar}" ];then
  270. rm -rf ${jar}
  271. echo "Removing duplicate jar $jar from share/hadoop/yarn/timelineservice/lib folder"
  272. fi
  273. done
  274. </echo>
  275. <exec executable="${shell-executable}" dir="${project.build.directory}" failonerror="true">
  276. <arg line="./remove-duplicate-timelineservice-jars.sh"/>
  277. </exec>
  278. </target>
  279. </configuration>
  280. </execution>
  281. </executions>
  282. </plugin>
  283. </plugins>
  284. </build>
  285. </profile>
  286. </profiles>
  287. <reporting>
  288. <plugins>
  289. <plugin>
  290. <groupId>com.github.spotbugs</groupId>
  291. <artifactId>spotbugs-maven-plugin</artifactId>
  292. <configuration>
  293. <xmlOutput>true</xmlOutput>
  294. </configuration>
  295. </plugin>
  296. </plugins>
  297. </reporting>
  298. </project>