pom.xml 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536
  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. https://maven.apache.org/xsd/maven-4.0.0.xsd">
  17. <parent>
  18. <artifactId>hadoop-yarn-server</artifactId>
  19. <groupId>org.apache.hadoop</groupId>
  20. <version>3.5.0-SNAPSHOT</version>
  21. </parent>
  22. <modelVersion>4.0.0</modelVersion>
  23. <artifactId>hadoop-yarn-server-resourcemanager</artifactId>
  24. <version>3.5.0-SNAPSHOT</version>
  25. <name>Apache Hadoop YARN ResourceManager</name>
  26. <properties>
  27. <!-- Needed for generating FindBugs warnings using parent pom -->
  28. <yarn.basedir>${project.parent.parent.basedir}</yarn.basedir>
  29. </properties>
  30. <dependencies>
  31. <dependency>
  32. <groupId>javax.servlet</groupId>
  33. <artifactId>javax.servlet-api</artifactId>
  34. </dependency>
  35. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  36. <dependency>
  37. <groupId>org.apache.hadoop</groupId>
  38. <artifactId>hadoop-common</artifactId>
  39. <scope>provided</scope>
  40. </dependency>
  41. <dependency>
  42. <groupId>org.slf4j</groupId>
  43. <artifactId>slf4j-api</artifactId>
  44. </dependency>
  45. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  46. <dependency>
  47. <groupId>org.apache.hadoop</groupId>
  48. <artifactId>hadoop-annotations</artifactId>
  49. </dependency>
  50. <dependency>
  51. <groupId>junit</groupId>
  52. <artifactId>junit</artifactId>
  53. <scope>test</scope>
  54. </dependency>
  55. <dependency>
  56. <groupId>org.assertj</groupId>
  57. <artifactId>assertj-core</artifactId>
  58. <scope>test</scope>
  59. </dependency>
  60. <dependency>
  61. <groupId>org.mockito</groupId>
  62. <artifactId>mockito-core</artifactId>
  63. <scope>test</scope>
  64. </dependency>
  65. <dependency>
  66. <groupId>org.mockito</groupId>
  67. <artifactId>mockito-inline</artifactId>
  68. <version>2.8.9</version>
  69. <scope>test</scope>
  70. </dependency>
  71. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  72. <dependency>
  73. <groupId>org.apache.hadoop</groupId>
  74. <artifactId>hadoop-common</artifactId>
  75. <type>test-jar</type>
  76. <scope>test</scope>
  77. </dependency>
  78. <dependency>
  79. <groupId>com.google.inject.extensions</groupId>
  80. <artifactId>guice-servlet</artifactId>
  81. </dependency>
  82. <dependency>
  83. <groupId>com.google.protobuf</groupId>
  84. <artifactId>protobuf-java</artifactId>
  85. <scope>${transient.protobuf2.scope}</scope>
  86. </dependency>
  87. <dependency>
  88. <groupId>commons-io</groupId>
  89. <artifactId>commons-io</artifactId>
  90. </dependency>
  91. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  92. <dependency>
  93. <groupId>org.apache.hadoop</groupId>
  94. <artifactId>hadoop-hdfs</artifactId>
  95. <scope>test</scope>
  96. </dependency>
  97. <dependency>
  98. <groupId>org.apache.hadoop</groupId>
  99. <artifactId>hadoop-hdfs-client</artifactId>
  100. <scope>test</scope>
  101. </dependency>
  102. <dependency>
  103. <groupId>com.google.inject</groupId>
  104. <artifactId>guice</artifactId>
  105. </dependency>
  106. <dependency>
  107. <groupId>com.sun.jersey.jersey-test-framework</groupId>
  108. <artifactId>jersey-test-framework-core</artifactId>
  109. <scope>test</scope>
  110. </dependency>
  111. <dependency>
  112. <groupId>com.github.pjfanning</groupId>
  113. <artifactId>jersey-json</artifactId>
  114. <exclusions>
  115. <exclusion>
  116. <groupId>com.fasterxml.jackson.core</groupId>
  117. <artifactId>jackson-core</artifactId>
  118. </exclusion>
  119. <exclusion>
  120. <groupId>com.fasterxml.jackson.core</groupId>
  121. <artifactId>jackson-databind</artifactId>
  122. </exclusion>
  123. <exclusion>
  124. <groupId>com.fasterxml.jackson.jaxrs</groupId>
  125. <artifactId>jackson-jaxrs-json-provider</artifactId>
  126. </exclusion>
  127. <exclusion>
  128. <groupId>org.codehaus.jettison</groupId>
  129. <artifactId>jettison</artifactId>
  130. </exclusion>
  131. </exclusions>
  132. </dependency>
  133. <dependency>
  134. <groupId>com.sun.jersey.contribs</groupId>
  135. <artifactId>jersey-guice</artifactId>
  136. </dependency>
  137. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  138. <dependency>
  139. <groupId>org.apache.hadoop</groupId>
  140. <artifactId>hadoop-yarn-common</artifactId>
  141. <type>test-jar</type>
  142. <scope>test</scope>
  143. </dependency>
  144. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  145. <dependency>
  146. <groupId>org.apache.hadoop</groupId>
  147. <artifactId>hadoop-yarn-common</artifactId>
  148. </dependency>
  149. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  150. <dependency>
  151. <groupId>org.apache.hadoop</groupId>
  152. <artifactId>hadoop-yarn-api</artifactId>
  153. </dependency>
  154. <dependency>
  155. <groupId>javax.xml.bind</groupId>
  156. <artifactId>jaxb-api</artifactId>
  157. </dependency>
  158. <dependency>
  159. <groupId>org.codehaus.jettison</groupId>
  160. <artifactId>jettison</artifactId>
  161. </dependency>
  162. <dependency>
  163. <groupId>com.sun.jersey</groupId>
  164. <artifactId>jersey-core</artifactId>
  165. </dependency>
  166. <dependency>
  167. <groupId>com.sun.jersey</groupId>
  168. <artifactId>jersey-client</artifactId>
  169. </dependency>
  170. <dependency>
  171. <groupId>org.eclipse.jetty</groupId>
  172. <artifactId>jetty-util</artifactId>
  173. </dependency>
  174. <dependency>
  175. <groupId>org.eclipse.jetty</groupId>
  176. <artifactId>jetty-util-ajax</artifactId>
  177. </dependency>
  178. <dependency>
  179. <groupId>org.apache.hadoop.thirdparty</groupId>
  180. <artifactId>hadoop-shaded-guava</artifactId>
  181. </dependency>
  182. <dependency>
  183. <groupId>ch.qos.reload4j</groupId>
  184. <artifactId>reload4j</artifactId>
  185. </dependency>
  186. <dependency>
  187. <groupId>org.apache.hadoop</groupId>
  188. <artifactId>hadoop-yarn-server-timelineservice</artifactId>
  189. <scope>test</scope>
  190. <type>test-jar</type>
  191. </dependency>
  192. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  193. <dependency>
  194. <groupId>org.apache.hadoop</groupId>
  195. <artifactId>hadoop-yarn-server-common</artifactId>
  196. </dependency>
  197. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  198. <dependency>
  199. <groupId>org.apache.hadoop</groupId>
  200. <artifactId>hadoop-yarn-server-applicationhistoryservice</artifactId>
  201. <version>${project.version}</version>
  202. </dependency>
  203. <dependency>
  204. <groupId>org.apache.hadoop</groupId>
  205. <artifactId>hadoop-yarn-server-timelineservice</artifactId>
  206. <scope>provided</scope>
  207. </dependency>
  208. <dependency>
  209. <groupId>org.apache.hadoop</groupId>
  210. <artifactId>hadoop-yarn-server-web-proxy</artifactId>
  211. </dependency>
  212. <dependency>
  213. <groupId>org.apache.curator</groupId>
  214. <artifactId>curator-client</artifactId>
  215. </dependency>
  216. <dependency>
  217. <groupId>org.apache.curator</groupId>
  218. <artifactId>curator-test</artifactId>
  219. <scope>test</scope>
  220. </dependency>
  221. <dependency>
  222. <groupId>org.apache.zookeeper</groupId>
  223. <artifactId>zookeeper</artifactId>
  224. </dependency>
  225. <dependency>
  226. <groupId>io.dropwizard.metrics</groupId>
  227. <artifactId>metrics-core</artifactId>
  228. </dependency>
  229. <dependency>
  230. <groupId>org.xerial.snappy</groupId>
  231. <artifactId>snappy-java</artifactId>
  232. <scope>provided</scope>
  233. </dependency>
  234. <dependency>
  235. <groupId>${leveldbjni.group}</groupId>
  236. <artifactId>leveldbjni-all</artifactId>
  237. </dependency>
  238. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  239. <dependency>
  240. <groupId>org.apache.zookeeper</groupId>
  241. <artifactId>zookeeper</artifactId>
  242. <scope>test</scope>
  243. <type>test-jar</type>
  244. </dependency>
  245. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  246. <dependency>
  247. <groupId>org.apache.hadoop</groupId>
  248. <artifactId>hadoop-hdfs</artifactId>
  249. <type>test-jar</type>
  250. <scope>test</scope>
  251. </dependency>
  252. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  253. <dependency>
  254. <groupId>org.apache.hadoop</groupId>
  255. <artifactId>hadoop-minikdc</artifactId>
  256. <scope>test</scope>
  257. </dependency>
  258. <dependency>
  259. <groupId>org.apache.hadoop</groupId>
  260. <artifactId>hadoop-auth</artifactId>
  261. <scope>test</scope>
  262. <type>test-jar</type>
  263. <version>${project.version}</version>
  264. </dependency>
  265. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  266. <dependency>
  267. <groupId>com.sun.jersey.jersey-test-framework</groupId>
  268. <artifactId>jersey-test-framework-grizzly2</artifactId>
  269. <scope>test</scope>
  270. </dependency>
  271. <dependency>
  272. <groupId>com.github.stefanbirkner</groupId>
  273. <artifactId>system-rules</artifactId>
  274. <scope>test</scope>
  275. </dependency>
  276. <!-- Necessary to include jackson separately to avoid issues with
  277. maven enforcer plugin in "hadoop-client-check-test-invariants"
  278. -->
  279. <dependency>
  280. <groupId>org.jsonschema2pojo</groupId>
  281. <artifactId>jsonschema2pojo-core</artifactId>
  282. <exclusions>
  283. <exclusion>
  284. <groupId>joda-time</groupId>
  285. <artifactId>joda-time</artifactId>
  286. </exclusion>
  287. <exclusion>
  288. <groupId>com.google.code.findbugs</groupId>
  289. <artifactId>jsr305</artifactId>
  290. </exclusion>
  291. <exclusion>
  292. <groupId>com.fasterxml.jackson.core</groupId>
  293. <artifactId>*</artifactId>
  294. </exclusion>
  295. <exclusion>
  296. <groupId>com.fasterxml.jackson.dataformat</groupId>
  297. <artifactId>*</artifactId>
  298. </exclusion>
  299. <exclusion>
  300. <groupId>org.codehaus.jackson</groupId>
  301. <artifactId>*</artifactId>
  302. </exclusion>
  303. <exclusion>
  304. <groupId>com.google.code.gson</groupId>
  305. <artifactId>gson</artifactId>
  306. </exclusion>
  307. <exclusion>
  308. <groupId>com.google.code.findbugs</groupId>
  309. <artifactId>annotations</artifactId>
  310. </exclusion>
  311. <exclusion>
  312. <groupId>org.scala-lang</groupId>
  313. <artifactId>scala-library</artifactId>
  314. </exclusion>
  315. <exclusion>
  316. <groupId>org.jsonschema2pojo</groupId>
  317. <artifactId>jsonschema2pojo-scalagen</artifactId>
  318. </exclusion>
  319. <exclusion>
  320. <groupId>com.google.code.javaparser</groupId>
  321. <artifactId>javaparser</artifactId>
  322. </exclusion>
  323. <exclusion>
  324. <groupId>javax.validation</groupId>
  325. <artifactId>validation-api</artifactId>
  326. </exclusion>
  327. </exclusions>
  328. </dependency>
  329. <dependency>
  330. <groupId>com.fasterxml.jackson.core</groupId>
  331. <artifactId>jackson-databind</artifactId>
  332. </dependency>
  333. </dependencies>
  334. <build>
  335. <testResources>
  336. <testResource>
  337. <directory>${basedir}/src/test/resources</directory>
  338. </testResource>
  339. <testResource>
  340. <directory>${basedir}/conf</directory>
  341. <includes>
  342. <include>capacity-scheduler.xml</include>
  343. </includes>
  344. </testResource>
  345. </testResources>
  346. <plugins>
  347. <!-- Publish tests jar -->
  348. <plugin>
  349. <artifactId>maven-jar-plugin</artifactId>
  350. <executions>
  351. <execution>
  352. <goals>
  353. <goal>test-jar</goal>
  354. </goals>
  355. <phase>test-compile</phase>
  356. <configuration>
  357. <archive>
  358. <manifest>
  359. <mainClass>org.apache.hadoop.test.YarnTestDriver</mainClass>
  360. </manifest>
  361. </archive>
  362. <excludes>
  363. <exclude>**/core-site.xml</exclude>
  364. <exclude>**/yarn-site.xml</exclude>
  365. </excludes>
  366. </configuration>
  367. </execution>
  368. </executions>
  369. </plugin>
  370. <plugin>
  371. <groupId>org.xolstice.maven.plugins</groupId>
  372. <artifactId>protobuf-maven-plugin</artifactId>
  373. <executions>
  374. <execution>
  375. <id>src-compile-protoc</id>
  376. <configuration>
  377. <skip>false</skip>
  378. <additionalProtoPathElements>
  379. <additionalProtoPathElement>
  380. ${basedir}/../../../../hadoop-common-project/hadoop-common/src/main/proto
  381. </additionalProtoPathElement>
  382. <additionalProtoPathElement>
  383. ${basedir}/../../hadoop-yarn-api/src/main/proto
  384. </additionalProtoPathElement>
  385. <additionalProtoPathElement>
  386. ${basedir}/../../hadoop-yarn-common/src/main/proto
  387. </additionalProtoPathElement>
  388. <additionalProtoPathElement>
  389. ${basedir}/../hadoop-yarn-server-common/src/main/proto
  390. </additionalProtoPathElement>
  391. </additionalProtoPathElements>
  392. </configuration>
  393. </execution>
  394. <execution>
  395. <id>src-test-compile-protoc</id>
  396. <configuration>
  397. <skip>false</skip>
  398. <additionalProtoPathElements>
  399. <additionalProtoPathElement>
  400. ${basedir}/../../../../hadoop-common-project/hadoop-common/src/main/proto
  401. </additionalProtoPathElement>
  402. <additionalProtoPathElement>
  403. ${basedir}/../../hadoop-yarn-api/src/main/proto
  404. </additionalProtoPathElement>
  405. </additionalProtoPathElements>
  406. </configuration>
  407. </execution>
  408. </executions>
  409. </plugin>
  410. <plugin>
  411. <groupId>com.google.code.maven-replacer-plugin</groupId>
  412. <artifactId>replacer</artifactId>
  413. <executions>
  414. <execution>
  415. <id>replace-generated-sources</id>
  416. <configuration>
  417. <skip>false</skip>
  418. </configuration>
  419. </execution>
  420. <execution>
  421. <id>replace-sources</id>
  422. <configuration>
  423. <skip>false</skip>
  424. </configuration>
  425. </execution>
  426. <execution>
  427. <id>replace-generated-test-sources</id>
  428. <configuration>
  429. <skip>false</skip>
  430. </configuration>
  431. </execution>
  432. <execution>
  433. <id>replace-test-sources</id>
  434. <configuration>
  435. <skip>false</skip>
  436. </configuration>
  437. </execution>
  438. </executions>
  439. </plugin>
  440. <plugin>
  441. <groupId>org.apache.rat</groupId>
  442. <artifactId>apache-rat-plugin</artifactId>
  443. <configuration>
  444. <excludes>
  445. <exclude>src/test/resources/submit-reservation.json</exclude>
  446. <exclude>src/test/resources/delete-reservation.json</exclude>
  447. <exclude>src/test/resources/update-reservation.json</exclude>
  448. <exclude>src/test/resources/invariants.txt</exclude>
  449. <exclude>src/test/resources/invariants_jdk9.txt</exclude>
  450. <exclude>src/test/resources/profiles/sample-profiles-1.json</exclude>
  451. <exclude>src/test/resources/profiles/sample-profiles-2.json</exclude>
  452. <exclude>src/test/resources/profiles/illegal-profiles-1.json</exclude>
  453. <exclude>src/test/resources/profiles/illegal-profiles-2.json</exclude>
  454. <exclude>src/test/resources/profiles/illegal-profiles-3.json</exclude>
  455. <!-- these two files are generated by jsonschema2pojo
  456. during build time -->
  457. <exclude>src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/placement/schema/MappingRulesDescription.java</exclude>
  458. <exclude>src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/placement/schema/Rule.java</exclude>
  459. <exclude>src/test/resources/webapp/*.json</exclude>
  460. <exclude>src/test/resources/webapp/*.xml</exclude>
  461. </excludes>
  462. </configuration>
  463. </plugin>
  464. <plugin>
  465. <groupId>org.jsonschema2pojo</groupId>
  466. <artifactId>jsonschema2pojo-maven-plugin</artifactId>
  467. <configuration>
  468. <sourceDirectory>${basedir}/src/main/json_schema</sourceDirectory>
  469. <targetPackage>org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.placement.schema</targetPackage>
  470. <outputDirectory>${basedir}/src/main/java</outputDirectory>
  471. </configuration>
  472. <executions>
  473. <execution>
  474. <goals>
  475. <goal>generate</goal>
  476. </goals>
  477. </execution>
  478. </executions>
  479. </plugin>
  480. </plugins>
  481. </build>
  482. <profiles>
  483. <profile>
  484. <id>visualize</id>
  485. <activation>
  486. <activeByDefault>false</activeByDefault>
  487. </activation>
  488. <build>
  489. <plugins>
  490. <plugin>
  491. <groupId>org.codehaus.mojo</groupId>
  492. <artifactId>exec-maven-plugin</artifactId>
  493. <executions>
  494. <execution>
  495. <phase>compile</phase>
  496. <goals>
  497. <goal>java</goal>
  498. </goals>
  499. <configuration>
  500. <mainClass>org.apache.hadoop.yarn.state.VisualizeStateMachine</mainClass>
  501. <classpathScope>compile</classpathScope>
  502. <arguments>
  503. <argument>ResourceManager</argument>
  504. <argument>org.apache.hadoop.yarn.server.resourcemanager.recovery.RMStateStore,
  505. org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttemptImpl,
  506. org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppImpl,
  507. org.apache.hadoop.yarn.server.resourcemanager.rmcontainer.RMContainerImpl,
  508. org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNodeImpl</argument>
  509. <argument>ResourceManager.gv</argument>
  510. </arguments>
  511. </configuration>
  512. </execution>
  513. </executions>
  514. </plugin>
  515. </plugins>
  516. </build>
  517. </profile>
  518. </profiles>
  519. </project>