pom.xml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388
  1. <?xml version="1.0"?>
  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
  16. http://maven.apache.org/xsd/maven-4.0.0.xsd">
  17. <parent>
  18. <artifactId>hadoop-yarn</artifactId>
  19. <groupId>org.apache.hadoop</groupId>
  20. <version>3.3.0-SNAPSHOT</version>
  21. </parent>
  22. <modelVersion>4.0.0</modelVersion>
  23. <artifactId>hadoop-yarn-common</artifactId>
  24. <version>3.3.0-SNAPSHOT</version>
  25. <name>Apache Hadoop YARN Common</name>
  26. <properties>
  27. <!-- Needed for generating FindBugs warnings using parent pom -->
  28. <yarn.basedir>${project.parent.basedir}</yarn.basedir>
  29. <should.run.jdiff>true</should.run.jdiff>
  30. <dev-support.relative.dir>../dev-support</dev-support.relative.dir>
  31. </properties>
  32. <dependencies>
  33. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  34. <dependency>
  35. <groupId>org.apache.hadoop</groupId>
  36. <artifactId>hadoop-common</artifactId>
  37. <scope>provided</scope>
  38. </dependency>
  39. <dependency>
  40. <groupId>org.apache.hadoop</groupId>
  41. <artifactId>hadoop-hdfs-client</artifactId>
  42. </dependency>
  43. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  44. <dependency>
  45. <groupId>org.apache.hadoop</groupId>
  46. <artifactId>hadoop-yarn-api</artifactId>
  47. </dependency>
  48. <dependency>
  49. <groupId>org.apache.hadoop</groupId>
  50. <artifactId>hadoop-auth</artifactId>
  51. </dependency>
  52. <dependency>
  53. <groupId>javax.xml.bind</groupId>
  54. <artifactId>jaxb-api</artifactId>
  55. </dependency>
  56. <dependency>
  57. <groupId>org.apache.commons</groupId>
  58. <artifactId>commons-compress</artifactId>
  59. </dependency>
  60. <dependency>
  61. <groupId>javax.servlet</groupId>
  62. <artifactId>javax.servlet-api</artifactId>
  63. </dependency>
  64. <dependency>
  65. <groupId>commons-codec</groupId>
  66. <artifactId>commons-codec</artifactId>
  67. </dependency>
  68. <dependency>
  69. <groupId>org.eclipse.jetty</groupId>
  70. <artifactId>jetty-util</artifactId>
  71. </dependency>
  72. <dependency>
  73. <groupId>com.sun.jersey</groupId>
  74. <artifactId>jersey-core</artifactId>
  75. </dependency>
  76. <dependency>
  77. <groupId>com.sun.jersey</groupId>
  78. <artifactId>jersey-client</artifactId>
  79. </dependency>
  80. <dependency>
  81. <groupId>com.google.guava</groupId>
  82. <artifactId>guava</artifactId>
  83. </dependency>
  84. <dependency>
  85. <groupId>commons-logging</groupId>
  86. <artifactId>commons-logging</artifactId>
  87. </dependency>
  88. <dependency>
  89. <groupId>commons-cli</groupId>
  90. <artifactId>commons-cli</artifactId>
  91. </dependency>
  92. <dependency>
  93. <groupId>org.slf4j</groupId>
  94. <artifactId>slf4j-api</artifactId>
  95. </dependency>
  96. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  97. <dependency>
  98. <groupId>org.apache.hadoop</groupId>
  99. <artifactId>hadoop-annotations</artifactId>
  100. </dependency>
  101. <dependency>
  102. <groupId>junit</groupId>
  103. <artifactId>junit</artifactId>
  104. <scope>test</scope>
  105. </dependency>
  106. <dependency>
  107. <groupId>org.mockito</groupId>
  108. <artifactId>mockito-core</artifactId>
  109. <scope>test</scope>
  110. </dependency>
  111. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  112. <dependency>
  113. <groupId>org.apache.hadoop</groupId>
  114. <artifactId>hadoop-common</artifactId>
  115. <type>test-jar</type>
  116. <scope>test</scope>
  117. </dependency>
  118. <dependency>
  119. <groupId>com.google.inject.extensions</groupId>
  120. <artifactId>guice-servlet</artifactId>
  121. </dependency>
  122. <dependency>
  123. <groupId>com.google.protobuf</groupId>
  124. <artifactId>protobuf-java</artifactId>
  125. </dependency>
  126. <dependency>
  127. <groupId>org.bouncycastle</groupId>
  128. <artifactId>bcprov-jdk15on</artifactId>
  129. <scope>test</scope>
  130. </dependency>
  131. <dependency>
  132. <groupId>com.sun.jersey.jersey-test-framework</groupId>
  133. <artifactId>jersey-test-framework-grizzly2</artifactId>
  134. <scope>test</scope>
  135. </dependency>
  136. <dependency>
  137. <groupId>commons-io</groupId>
  138. <artifactId>commons-io</artifactId>
  139. </dependency>
  140. <dependency>
  141. <groupId>com.google.inject</groupId>
  142. <artifactId>guice</artifactId>
  143. </dependency>
  144. <dependency>
  145. <groupId>com.sun.jersey</groupId>
  146. <artifactId>jersey-server</artifactId>
  147. </dependency>
  148. <dependency>
  149. <groupId>com.sun.jersey</groupId>
  150. <artifactId>jersey-json</artifactId>
  151. </dependency>
  152. <dependency>
  153. <groupId>com.sun.jersey.contribs</groupId>
  154. <artifactId>jersey-guice</artifactId>
  155. </dependency>
  156. <dependency>
  157. <groupId>log4j</groupId>
  158. <artifactId>log4j</artifactId>
  159. </dependency>
  160. <dependency>
  161. <groupId>com.fasterxml.jackson.core</groupId>
  162. <artifactId>jackson-core</artifactId>
  163. </dependency>
  164. <dependency>
  165. <groupId>com.fasterxml.jackson.core</groupId>
  166. <artifactId>jackson-databind</artifactId>
  167. </dependency>
  168. <dependency>
  169. <groupId>com.fasterxml.jackson.module</groupId>
  170. <artifactId>jackson-module-jaxb-annotations</artifactId>
  171. </dependency>
  172. <dependency>
  173. <groupId>com.fasterxml.jackson.jaxrs</groupId>
  174. <artifactId>jackson-jaxrs-json-provider</artifactId>
  175. </dependency>
  176. </dependencies>
  177. <build>
  178. <!--
  179. Include all files in src/main/resources. By default, do not apply property
  180. substitution (filtering=false), but do apply property substitution to
  181. yarn-version-info.properties (filtering=true). This will substitute the
  182. version information correctly, but prevent Maven from altering other files
  183. like yarn-default.xml.
  184. -->
  185. <resources>
  186. <resource>
  187. <directory>${basedir}/src/main/resources</directory>
  188. <excludes>
  189. <exclude>yarn-version-info.properties</exclude>
  190. </excludes>
  191. <filtering>false</filtering>
  192. </resource>
  193. <resource>
  194. <directory>${basedir}/src/main/resources</directory>
  195. <includes>
  196. <include>yarn-version-info.properties</include>
  197. </includes>
  198. <filtering>true</filtering>
  199. </resource>
  200. </resources>
  201. <testResources>
  202. <testResource>
  203. <directory>${project.basedir}/src/test/resources</directory>
  204. </testResource>
  205. <testResource>
  206. <directory>${project.basedir}/src/test/resources/resource-types</directory>
  207. </testResource>
  208. </testResources>
  209. <plugins>
  210. <plugin>
  211. <groupId>org.apache.rat</groupId>
  212. <artifactId>apache-rat-plugin</artifactId>
  213. <configuration>
  214. <excludes>
  215. <exclude>src/main/resources/webapps/mapreduce/.keep</exclude>
  216. <exclude>src/main/resources/webapps/jobhistory/.keep</exclude>
  217. <exclude>src/main/resources/webapps/yarn/.keep</exclude>
  218. <exclude>src/main/resources/webapps/applicationhistory/.keep</exclude>
  219. <exclude>src/main/resources/webapps/timeline/.keep</exclude>
  220. <exclude>src/main/resources/webapps/sharedcache/.keep</exclude>
  221. <exclude>src/main/resources/webapps/cluster/.keep</exclude>
  222. <exclude>src/main/resources/webapps/test/.keep</exclude>
  223. <exclude>src/main/resources/webapps/proxy/.keep</exclude>
  224. <exclude>src/main/resources/webapps/node/.keep</exclude>
  225. <exclude>src/main/resources/webapps/static/dt-1.10.18/css/jquery.dataTables.css</exclude>
  226. <exclude>src/main/resources/webapps/static/dt-1.10.18/css/custom_datatable.css</exclude>
  227. <exclude>src/main/resources/webapps/static/dt-1.10.18/css/jui-dt.css</exclude>
  228. <exclude>src/main/resources/webapps/static/dt-1.10.18/css/demo_table.css</exclude>
  229. <exclude>src/main/resources/webapps/static/dt-1.10.18/images/Sorting icons.psd</exclude>
  230. <exclude>src/main/resources/webapps/static/dt-1.10.18/js/jquery.dataTables.min.js</exclude>
  231. <exclude>src/main/resources/webapps/static/jt/jquery.jstree.js</exclude>
  232. <exclude>src/main/resources/webapps/static/jquery/jquery-ui-1.12.1.custom.min.js</exclude>
  233. <exclude>src/main/resources/webapps/static/jquery/jquery-3.3.1.min.js</exclude>
  234. <exclude>src/main/resources/webapps/static/jquery/themes-1.9.1/base/jquery-ui.css</exclude>
  235. <exclude>src/test/resources/application_1440536969523_0001.har/_index</exclude>
  236. <exclude>src/test/resources/application_1440536969523_0001.har/part-0</exclude>
  237. <exclude>src/test/resources/application_1440536969523_0001.har/_masterindex</exclude>
  238. <exclude>src/test/resources/application_1440536969523_0001.har/_SUCCESS</exclude>
  239. <exclude>src/test/resources/application_123456_0001.har/_index</exclude>
  240. <exclude>src/test/resources/application_123456_0001.har/part-0</exclude>
  241. <exclude>src/test/resources/application_123456_0001.har/_masterindex</exclude>
  242. <exclude>src/test/resources/application_123456_0001.har/_SUCCESS</exclude>
  243. </excludes>
  244. </configuration>
  245. </plugin>
  246. <plugin>
  247. <groupId>org.apache.hadoop</groupId>
  248. <artifactId>hadoop-maven-plugins</artifactId>
  249. <executions>
  250. <execution>
  251. <id>version-info</id>
  252. <phase>generate-resources</phase>
  253. <goals>
  254. <goal>version-info</goal>
  255. </goals>
  256. <configuration>
  257. <source>
  258. <directory>${basedir}/src/main</directory>
  259. <includes>
  260. <include>java/**/*.java</include>
  261. <include>proto/**/*.proto</include>
  262. </includes>
  263. </source>
  264. </configuration>
  265. </execution>
  266. <execution>
  267. <id>compile-protoc</id>
  268. <goals>
  269. <goal>protoc</goal>
  270. </goals>
  271. <configuration>
  272. <protocVersion>${protobuf.version}</protocVersion>
  273. <protocCommand>${protoc.path}</protocCommand>
  274. <imports>
  275. <param>${basedir}/../../../hadoop-common-project/hadoop-common/src/main/proto</param>
  276. <param>${basedir}/../hadoop-yarn-api/src/main/proto</param>
  277. <param>${basedir}/src/main/proto</param>
  278. </imports>
  279. <source>
  280. <directory>${basedir}/src/main/proto</directory>
  281. <includes>
  282. <include>yarn_security_token.proto</include>
  283. </includes>
  284. </source>
  285. </configuration>
  286. </execution>
  287. <execution>
  288. <id>resource-gz</id>
  289. <phase>generate-resources</phase>
  290. <goals>
  291. <goal>resource-gz</goal>
  292. </goals>
  293. <configuration>
  294. <inputDirectory>${basedir}/src/main/resources/webapps/static</inputDirectory>
  295. <outputDirectory>${basedir}/target/classes/webapps/static</outputDirectory>
  296. <extensions>js,css</extensions>
  297. </configuration>
  298. </execution>
  299. </executions>
  300. </plugin>
  301. <plugin>
  302. <artifactId>maven-jar-plugin</artifactId>
  303. <executions>
  304. <execution>
  305. <goals>
  306. <goal>test-jar</goal>
  307. </goals>
  308. <phase>test-compile</phase>
  309. </execution>
  310. </executions>
  311. </plugin>
  312. <plugin>
  313. <artifactId>maven-antrun-plugin</artifactId>
  314. <executions>
  315. <execution>
  316. <phase>pre-site</phase>
  317. <goals>
  318. <goal>run</goal>
  319. </goals>
  320. <configuration>
  321. <tasks>
  322. <copy file="src/main/resources/yarn-default.xml" todir="src/site/resources"/>
  323. <copy file="src/main/xsl/configuration.xsl" todir="src/site/resources"/>
  324. </tasks>
  325. </configuration>
  326. </execution>
  327. </executions>
  328. </plugin>
  329. <plugin>
  330. <artifactId>maven-clean-plugin</artifactId>
  331. <configuration>
  332. <filesets>
  333. <fileset>
  334. <directory>src/site/resources</directory>
  335. <includes>
  336. <include>configuration.xsl</include>
  337. <include>yarn-default.xml</include>
  338. </includes>
  339. <followSymlinks>false</followSymlinks>
  340. </fileset>
  341. </filesets>
  342. </configuration>
  343. </plugin>
  344. </plugins>
  345. </build>
  346. <!-- TODO: Remove this profile when hamlet was removed. -->
  347. <profiles>
  348. <profile>
  349. <id>java9</id>
  350. <activation>
  351. <jdk>[9,)</jdk>
  352. </activation>
  353. <build>
  354. <plugins>
  355. <plugin>
  356. <artifactId>maven-compiler-plugin</artifactId>
  357. <configuration>
  358. <excludes>
  359. <exclude>org/apache/hadoop/yarn/webapp/hamlet/**</exclude>
  360. </excludes>
  361. <testExcludes>
  362. <exclude>org/apache/hadoop/yarn/webapp/hamlet/**</exclude>
  363. </testExcludes>
  364. </configuration>
  365. </plugin>
  366. <plugin>
  367. <artifactId>maven-javadoc-plugin</artifactId>
  368. <configuration>
  369. <excludePackageNames>org.apache.hadoop.yarn.webapp.hamlet</excludePackageNames>
  370. </configuration>
  371. </plugin>
  372. </plugins>
  373. </build>
  374. </profile>
  375. </profiles>
  376. </project>