pom.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  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.4.0-SNAPSHOT</version>
  19. <relativePath>../../hadoop-project</relativePath>
  20. </parent>
  21. <artifactId>hadoop-yarn</artifactId>
  22. <version>3.4.0-SNAPSHOT</version>
  23. <packaging>pom</packaging>
  24. <name>Apache Hadoop YARN</name>
  25. <properties>
  26. <test.logs>true</test.logs>
  27. <test.timeout>600000</test.timeout>
  28. <yarn.basedir>${basedir}</yarn.basedir>
  29. <!-- Used by jdiff -->
  30. <!-- Antrun cannot resolve yarn.basedir, so we need to setup something else -->
  31. <dev-support.relative.dir>dev-support</dev-support.relative.dir>
  32. <hadoop.common.build.dir>${basedir}/../../../hadoop-common-project/hadoop-common/target</hadoop.common.build.dir>
  33. </properties>
  34. <!-- Do not add dependencies here, add them to the POM of the leaf module -->
  35. <build>
  36. <plugins>
  37. <plugin>
  38. <groupId>com.github.spotbugs</groupId>
  39. <artifactId>spotbugs-maven-plugin</artifactId>
  40. <configuration>
  41. <xmlOutput>true</xmlOutput>
  42. <excludeFilterFile>${yarn.basedir}/dev-support/findbugs-exclude.xml</excludeFilterFile>
  43. <effort>Max</effort>
  44. </configuration>
  45. </plugin>
  46. <plugin>
  47. <groupId>org.apache.rat</groupId>
  48. <artifactId>apache-rat-plugin</artifactId>
  49. <configuration>
  50. <excludes>
  51. <exclude>conf/workers</exclude>
  52. <exclude>conf/container-executor.cfg</exclude>
  53. <exclude>dev-support/jdiff/**</exclude>
  54. </excludes>
  55. </configuration>
  56. </plugin>
  57. <plugin>
  58. <groupId>org.apache.maven.plugins</groupId>
  59. <artifactId>maven-surefire-plugin</artifactId>
  60. <configuration>
  61. <properties>
  62. <property>
  63. <name>listener</name>
  64. <value>org.apache.hadoop.test.TimedOutTestsListener</value>
  65. </property>
  66. </properties>
  67. </configuration>
  68. </plugin>
  69. <plugin>
  70. <groupId>org.apache.maven.plugins</groupId>
  71. <artifactId>maven-javadoc-plugin</artifactId>
  72. <configuration>
  73. <excludePackageNames>org.apache.hadoop.yarn.proto:org.apache.hadoop.yarn.federation.proto:org.apache.hadoop.yarn.service</excludePackageNames>
  74. </configuration>
  75. </plugin>
  76. <plugin>
  77. <groupId>org.apache.maven.plugins</groupId>
  78. <artifactId>maven-enforcer-plugin</artifactId>
  79. <dependencies>
  80. <dependency>
  81. <groupId>de.skuzzle.enforcer</groupId>
  82. <artifactId>restrict-imports-enforcer-rule</artifactId>
  83. <version>${restrict-imports.enforcer.version}</version>
  84. </dependency>
  85. </dependencies>
  86. <executions>
  87. <execution>
  88. <id>banned-illegal-imports</id>
  89. <phase>process-sources</phase>
  90. <goals>
  91. <goal>enforce</goal>
  92. </goals>
  93. <configuration>
  94. <rules>
  95. <restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports">
  96. <includeTestCode>true</includeTestCode>
  97. <reason>Use hadoop-common provided Lists rather than Guava provided Lists</reason>
  98. <bannedImports>
  99. <bannedImport>org.apache.hadoop.thirdparty.com.google.common.collect.Lists</bannedImport>
  100. <bannedImport>com.google.common.collect.Lists</bannedImport>
  101. </bannedImports>
  102. </restrictImports>
  103. </rules>
  104. </configuration>
  105. </execution>
  106. </executions>
  107. </plugin>
  108. </plugins>
  109. </build>
  110. <profiles>
  111. <profile>
  112. <id>release</id>
  113. <build>
  114. <plugins>
  115. <plugin>
  116. <artifactId>maven-source-plugin</artifactId>
  117. <executions>
  118. <execution>
  119. <id>attach-sources</id>
  120. <goals>
  121. <!-- avoid warning about recursion -->
  122. <goal>jar-no-fork</goal>
  123. </goals>
  124. </execution>
  125. </executions>
  126. </plugin>
  127. </plugins>
  128. </build>
  129. </profile>
  130. <profile>
  131. <id>docs</id>
  132. <activation>
  133. <activeByDefault>false</activeByDefault>
  134. </activation>
  135. <properties>
  136. <jdiff.stable.api>2.7.2</jdiff.stable.api>
  137. <jdiff.stability>-unstable</jdiff.stability>
  138. <jdiff.compatibility></jdiff.compatibility>
  139. <jdiff.javadoc.maxmemory>512m</jdiff.javadoc.maxmemory>
  140. </properties>
  141. <dependencies>
  142. <dependency>
  143. <groupId>xerces</groupId>
  144. <artifactId>xercesImpl</artifactId>
  145. <version>${xerces.jdiff.version}</version>
  146. </dependency>
  147. </dependencies>
  148. <build>
  149. <plugins>
  150. <plugin>
  151. <groupId>org.apache.maven.plugins</groupId>
  152. <artifactId>maven-javadoc-plugin</artifactId>
  153. <executions>
  154. <execution>
  155. <goals>
  156. <goal>javadoc-no-fork</goal>
  157. </goals>
  158. <phase>prepare-package</phase>
  159. </execution>
  160. </executions>
  161. </plugin>
  162. <plugin>
  163. <groupId>org.apache.maven.plugins</groupId>
  164. <artifactId>maven-dependency-plugin</artifactId>
  165. <executions>
  166. <execution>
  167. <id>site</id>
  168. <phase>prepare-package</phase>
  169. <goals>
  170. <goal>copy</goal>
  171. </goals>
  172. <configuration>
  173. <artifactItems>
  174. <artifactItem>
  175. <groupId>jdiff</groupId>
  176. <artifactId>jdiff</artifactId>
  177. <version>${jdiff.version}</version>
  178. <overWrite>false</overWrite>
  179. <outputDirectory>${project.build.directory}</outputDirectory>
  180. <destFileName>jdiff.jar</destFileName>
  181. </artifactItem>
  182. <artifactItem>
  183. <groupId>org.apache.hadoop</groupId>
  184. <artifactId>hadoop-annotations</artifactId>
  185. <version>${project.version}</version>
  186. <overWrite>false</overWrite>
  187. <outputDirectory>${project.build.directory}</outputDirectory>
  188. <destFileName>hadoop-annotations.jar</destFileName>
  189. </artifactItem>
  190. <artifactItem>
  191. <groupId>xerces</groupId>
  192. <artifactId>xercesImpl</artifactId>
  193. <version>${xerces.version.jdiff}</version>
  194. <overWrite>false</overWrite>
  195. <outputDirectory>${project.build.directory}</outputDirectory>
  196. <destFileName>xerces.jar</destFileName>
  197. </artifactItem>
  198. </artifactItems>
  199. </configuration>
  200. </execution>
  201. </executions>
  202. </plugin>
  203. <plugin>
  204. <groupId>org.apache.maven.plugins</groupId>
  205. <artifactId>maven-antrun-plugin</artifactId>
  206. <executions>
  207. <execution>
  208. <id>site</id>
  209. <phase>prepare-package</phase>
  210. <goals>
  211. <goal>run</goal>
  212. </goals>
  213. <configuration>
  214. <target if="should.run.jdiff">
  215. <!-- Jdiff -->
  216. <mkdir dir="${project.build.directory}/site/jdiff/xml"/>
  217. <javadoc maxmemory="${jdiff.javadoc.maxmemory}" verbose="yes">
  218. <doclet name="org.apache.hadoop.classification.tools.IncludePublicAnnotationsJDiffDoclet"
  219. path="${project.build.directory}/hadoop-annotations.jar:${project.build.directory}/jdiff.jar">
  220. <param name="-apidir" value="${project.build.directory}/site/jdiff/xml"/>
  221. <param name="-apiname" value="${project.name} ${project.version}"/>
  222. <param name="${jdiff.stability}"/>
  223. </doclet>
  224. <packageset dir="${basedir}/src/main/java"/>
  225. <classpath>
  226. <path refid="maven.compile.classpath"/>
  227. </classpath>
  228. </javadoc>
  229. <javadoc sourcepath="${basedir}/src/main/java"
  230. destdir="${project.build.directory}/site/jdiff/xml"
  231. sourceFiles="${dev-support.relative.dir}/jdiff/Null.java"
  232. maxmemory="${jdiff.javadoc.maxmemory}">
  233. <doclet name="org.apache.hadoop.classification.tools.IncludePublicAnnotationsJDiffDoclet"
  234. path="${project.build.directory}/hadoop-annotations.jar:${project.build.directory}/jdiff.jar:${project.build.directory}/xerces.jar">
  235. <param name="-oldapi" value="${project.name} ${jdiff.stable.api}"/>
  236. <param name="-newapi" value="${project.name} ${project.version}"/>
  237. <param name="-oldapidir" value="${basedir}/${dev-support.relative.dir}/jdiff"/>
  238. <param name="-newapidir" value="${project.build.directory}/site/jdiff/xml"/>
  239. <param name="-javadocold"
  240. value="https://hadoop.apache.org/docs/r${jdiff.stable.api}/api/"/>
  241. <param name="-javadocnew" value="${project.build.directory}/site/apidocs/"/>
  242. <param name="-stats"/>
  243. <param name="${jdiff.stability}"/>
  244. <!--param name="${jdiff.compatibility}"/-->
  245. </doclet>
  246. <classpath>
  247. <path refid="maven.compile.classpath"/>
  248. </classpath>
  249. </javadoc>
  250. </target>
  251. </configuration>
  252. </execution>
  253. </executions>
  254. </plugin>
  255. </plugins>
  256. </build>
  257. </profile>
  258. </profiles>
  259. <modules>
  260. <module>hadoop-yarn-api</module>
  261. <module>hadoop-yarn-common</module>
  262. <module>hadoop-yarn-server</module>
  263. <module>hadoop-yarn-applications</module>
  264. <module>hadoop-yarn-site</module>
  265. <module>hadoop-yarn-client</module>
  266. <module>hadoop-yarn-registry</module>
  267. <module>hadoop-yarn-ui</module>
  268. <module>hadoop-yarn-csi</module>
  269. </modules>
  270. <!-- -->
  271. </project>