pom.xml 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one or more
  4. contributor license agreements. See the NOTICE file distributed with
  5. this work for additional information regarding copyright ownership.
  6. The ASF licenses this file to You under the Apache License, Version 2.0
  7. (the "License"); you may not use this file except in compliance with
  8. the License. You may obtain a copy of the License at
  9. http://www.apache.org/licenses/LICENSE-2.0
  10. Unless required by applicable law or agreed to in writing, software
  11. distributed under the License is distributed on an "AS IS" BASIS,
  12. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. See the License for the specific language governing permissions and
  14. limitations under the License.
  15. -->
  16. <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
  17. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd">
  18. <modelVersion>4.0.0</modelVersion>
  19. <groupId>org.apache.hadoop</groupId>
  20. <artifactId>hadoop-yarn-applications-catalog-webapp</artifactId>
  21. <packaging>war</packaging>
  22. <parent>
  23. <artifactId>hadoop-yarn-applications-catalog</artifactId>
  24. <groupId>org.apache.hadoop</groupId>
  25. <version>3.5.0-SNAPSHOT</version>
  26. </parent>
  27. <name>Apache Hadoop YARN Application Catalog Webapp</name>
  28. <url>https://hadoop.apache.org</url>
  29. <properties>
  30. <artifact.name>app</artifact.name>
  31. <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
  32. <vendor.loc>target/generated-sources/vendor</vendor.loc>
  33. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  34. <dependency.locations.enabled>false</dependency.locations.enabled>
  35. <javascript.test>*Spec</javascript.test>
  36. </properties>
  37. <dependencies>
  38. <dependency>
  39. <groupId>io.swagger</groupId>
  40. <artifactId>swagger-annotations</artifactId>
  41. </dependency>
  42. <dependency>
  43. <groupId>org.mockito</groupId>
  44. <artifactId>mockito-all</artifactId>
  45. <version>1.9.5</version>
  46. <scope>test</scope>
  47. </dependency>
  48. <dependency>
  49. <groupId>org.powermock</groupId>
  50. <artifactId>powermock-module-junit4</artifactId>
  51. <version>${powermock.version}</version>
  52. <scope>test</scope>
  53. <exclusions>
  54. <exclusion>
  55. <groupId>junit</groupId>
  56. <artifactId>junit</artifactId>
  57. </exclusion>
  58. </exclusions>
  59. </dependency>
  60. <dependency>
  61. <groupId>org.powermock</groupId>
  62. <artifactId>powermock-api-mockito</artifactId>
  63. <version>${powermock.version}</version>
  64. <exclusions>
  65. <exclusion>
  66. <groupId>org.mockito</groupId>
  67. <artifactId>mockito-all</artifactId>
  68. </exclusion>
  69. </exclusions>
  70. <scope>test</scope>
  71. </dependency>
  72. <dependency>
  73. <groupId>org.glassfish.jersey.media</groupId>
  74. <artifactId>jersey-media-json-jackson</artifactId>
  75. <version>2.12</version>
  76. <scope>test</scope>
  77. <exclusions>
  78. <exclusion>
  79. <groupId>org.javassist</groupId>
  80. <artifactId>javassist</artifactId>
  81. </exclusion>
  82. <exclusion>
  83. <groupId>com.fasterxml.jackson.jaxrs</groupId>
  84. <artifactId>jackson-jaxrs-base</artifactId>
  85. </exclusion>
  86. </exclusions>
  87. </dependency>
  88. <dependency>
  89. <groupId>org.junit.jupiter</groupId>
  90. <artifactId>junit-jupiter-api</artifactId>
  91. <scope>test</scope>
  92. </dependency>
  93. <dependency>
  94. <groupId>org.junit.jupiter</groupId>
  95. <artifactId>junit-jupiter-engine</artifactId>
  96. <scope>test</scope>
  97. </dependency>
  98. <dependency>
  99. <groupId>org.junit.platform</groupId>
  100. <artifactId>junit-platform-launcher</artifactId>
  101. <scope>test</scope>
  102. </dependency>
  103. <dependency>
  104. <groupId>com.github.pjfanning</groupId>
  105. <artifactId>jersey-json</artifactId>
  106. <exclusions>
  107. <exclusion>
  108. <groupId>com.fasterxml.jackson.core</groupId>
  109. <artifactId>jackson-core</artifactId>
  110. </exclusion>
  111. <exclusion>
  112. <groupId>com.fasterxml.jackson.core</groupId>
  113. <artifactId>jackson-databind</artifactId>
  114. </exclusion>
  115. <exclusion>
  116. <groupId>com.fasterxml.jackson.jaxrs</groupId>
  117. <artifactId>jackson-jaxrs-json-provider</artifactId>
  118. </exclusion>
  119. <exclusion>
  120. <groupId>org.codehaus.jettison</groupId>
  121. <artifactId>jettison</artifactId>
  122. </exclusion>
  123. </exclusions>
  124. </dependency>
  125. <dependency>
  126. <groupId>org.apache.solr</groupId>
  127. <artifactId>solr-solrj</artifactId>
  128. <version>${solr.version}</version>
  129. <exclusions>
  130. <exclusion>
  131. <groupId>org.slf4j</groupId>
  132. <artifactId>jcl-over-slf4j</artifactId>
  133. </exclusion>
  134. <exclusion>
  135. <groupId>org.slf4j</groupId>
  136. <artifactId>slf4j-api</artifactId>
  137. </exclusion>
  138. <exclusion>
  139. <groupId>org.eclipse.jetty</groupId>
  140. <artifactId>jetty-http</artifactId>
  141. </exclusion>
  142. <exclusion>
  143. <groupId>org.eclipse.jetty</groupId>
  144. <artifactId>jetty-client</artifactId>
  145. </exclusion>
  146. <exclusion>
  147. <groupId>org.eclipse.jetty</groupId>
  148. <artifactId>jetty-io</artifactId>
  149. </exclusion>
  150. </exclusions>
  151. </dependency>
  152. <dependency>
  153. <groupId>org.apache.solr</groupId>
  154. <artifactId>solr-core</artifactId>
  155. <version>${solr.version}</version>
  156. <exclusions>
  157. <exclusion>
  158. <groupId>org.slf4j</groupId>
  159. <artifactId>jcl-over-slf4j</artifactId>
  160. </exclusion>
  161. <exclusion>
  162. <groupId>org.eclipse.jetty</groupId>
  163. <artifactId>jetty-io</artifactId>
  164. </exclusion>
  165. <exclusion>
  166. <groupId>org.eclipse.jetty</groupId>
  167. <artifactId>jetty-xml</artifactId>
  168. </exclusion>
  169. <exclusion>
  170. <groupId>org.eclipse.jetty</groupId>
  171. <artifactId>jetty-http</artifactId>
  172. </exclusion>
  173. <exclusion>
  174. <groupId>org.eclipse.jetty</groupId>
  175. <artifactId>jetty-client</artifactId>
  176. </exclusion>
  177. </exclusions>
  178. <scope>test</scope>
  179. </dependency>
  180. <dependency>
  181. <groupId>org.apache.solr</groupId>
  182. <artifactId>solr-test-framework</artifactId>
  183. <version>${solr.version}</version>
  184. <exclusions>
  185. <exclusion>
  186. <groupId>org.slf4j</groupId>
  187. <artifactId>jcl-over-slf4j</artifactId>
  188. </exclusion>
  189. <exclusion>
  190. <groupId>org.eclipse.jetty</groupId>
  191. <artifactId>jetty-io</artifactId>
  192. </exclusion>
  193. <exclusion>
  194. <groupId>org.eclipse.jetty</groupId>
  195. <artifactId>jetty-xml</artifactId>
  196. </exclusion>
  197. <exclusion>
  198. <groupId>org.eclipse.jetty</groupId>
  199. <artifactId>jetty-http</artifactId>
  200. </exclusion>
  201. <exclusion>
  202. <groupId>org.eclipse.jetty</groupId>
  203. <artifactId>jetty-client</artifactId>
  204. </exclusion>
  205. </exclusions>
  206. <scope>test</scope>
  207. </dependency>
  208. <dependency>
  209. <groupId>org.slf4j</groupId>
  210. <artifactId>jcl-over-slf4j</artifactId>
  211. <version>${slf4j.version}</version>
  212. </dependency>
  213. <dependency>
  214. <groupId>org.slf4j</groupId>
  215. <artifactId>slf4j-api</artifactId>
  216. <version>${slf4j.version}</version>
  217. </dependency>
  218. <dependency>
  219. <groupId>org.apache.hadoop</groupId>
  220. <artifactId>hadoop-common</artifactId>
  221. </dependency>
  222. <dependency>
  223. <groupId>org.apache.hadoop</groupId>
  224. <artifactId>hadoop-auth</artifactId>
  225. </dependency>
  226. <dependency>
  227. <groupId>org.apache.hadoop</groupId>
  228. <artifactId>hadoop-yarn-common</artifactId>
  229. </dependency>
  230. <dependency>
  231. <groupId>org.apache.hadoop</groupId>
  232. <artifactId>hadoop-yarn-services-core</artifactId>
  233. </dependency>
  234. <dependency>
  235. <groupId>org.apache.hadoop</groupId>
  236. <artifactId>hadoop-yarn-services-api</artifactId>
  237. </dependency>
  238. <dependency>
  239. <groupId>com.fasterxml.jackson.core</groupId>
  240. <artifactId>jackson-core</artifactId>
  241. <version>${jackson2.version}</version>
  242. </dependency>
  243. <dependency>
  244. <groupId>com.fasterxml.jackson.core</groupId>
  245. <artifactId>jackson-annotations</artifactId>
  246. <version>${jackson2.version}</version>
  247. </dependency>
  248. <dependency>
  249. <groupId>com.fasterxml.jackson.core</groupId>
  250. <artifactId>jackson-databind</artifactId>
  251. </dependency>
  252. <dependency>
  253. <groupId>com.fasterxml.jackson.jaxrs</groupId>
  254. <artifactId>jackson-jaxrs-json-provider</artifactId>
  255. <version>${jackson2.version}</version>
  256. </dependency>
  257. <dependency>
  258. <groupId>com.fasterxml.jackson.jaxrs</groupId>
  259. <artifactId>jackson-jaxrs-base</artifactId>
  260. <version>${jackson2.version}</version>
  261. </dependency>
  262. </dependencies>
  263. <build>
  264. <finalName>${artifact.name}</finalName>
  265. <resources>
  266. <resource>
  267. <directory>src/main/javascript</directory>
  268. <filtering>true</filtering>
  269. </resource>
  270. <resource>
  271. <directory>src/main/resources</directory>
  272. <filtering>true</filtering>
  273. </resource>
  274. </resources>
  275. <plugins>
  276. <plugin>
  277. <groupId>com.github.eirslett</groupId>
  278. <artifactId>frontend-maven-plugin</artifactId>
  279. <configuration>
  280. <workingDirectory>target</workingDirectory>
  281. </configuration>
  282. <executions>
  283. <execution>
  284. <id>install node and yarn</id>
  285. <goals>
  286. <goal>install-node-and-yarn</goal>
  287. </goals>
  288. <phase>generate-resources</phase>
  289. <configuration>
  290. <nodeVersion>${nodejs.version}</nodeVersion>
  291. <yarnVersion>${yarnpkg.version}</yarnVersion>
  292. </configuration>
  293. </execution>
  294. <execution>
  295. <id>yarn install</id>
  296. <goals>
  297. <goal>yarn</goal>
  298. </goals>
  299. </execution>
  300. </executions>
  301. </plugin>
  302. <plugin>
  303. <groupId>org.apache.maven.plugins</groupId>
  304. <artifactId>maven-compiler-plugin</artifactId>
  305. <configuration>
  306. <compilerArguments>
  307. <endorseddirs>${endorsed.dir}</endorseddirs>
  308. </compilerArguments>
  309. </configuration>
  310. </plugin>
  311. <plugin>
  312. <groupId>org.apache.maven.plugins</groupId>
  313. <artifactId>maven-surefire-plugin</artifactId>
  314. <configuration>
  315. <systemPropertyVariables>
  316. <log4j.configuration>file:${project.build.testOutputDirectory}/log4j.properties</log4j.configuration>
  317. </systemPropertyVariables>
  318. </configuration>
  319. </plugin>
  320. <plugin>
  321. <groupId>org.apache.maven.plugins</groupId>
  322. <artifactId>maven-war-plugin</artifactId>
  323. <configuration>
  324. <failOnMissingWebXml>false</failOnMissingWebXml>
  325. <webResources>
  326. <resource>
  327. <directory>target/generated-sources</directory>
  328. <includes>
  329. <include>vendor/jquery/**</include>
  330. <include>vendor/angular/**</include>
  331. <include>vendor/angular-route/**</include>
  332. <include>vendor/bootstrap/**</include>
  333. <include>vendor/roboto-fontface/fonts/roboto/Roboto-Regular.woff</include>
  334. </includes>
  335. </resource>
  336. </webResources>
  337. </configuration>
  338. </plugin>
  339. <plugin>
  340. <groupId>org.apache.maven.plugins</groupId>
  341. <artifactId>maven-dependency-plugin</artifactId>
  342. <executions>
  343. <execution>
  344. <phase>validate</phase>
  345. <goals>
  346. <goal>copy</goal>
  347. </goals>
  348. <configuration>
  349. <outputDirectory>${endorsed.dir}</outputDirectory>
  350. <silent>true</silent>
  351. <artifactItems>
  352. <artifactItem>
  353. <groupId>javax</groupId>
  354. <artifactId>javaee-endorsed-api</artifactId>
  355. <version>7.0</version>
  356. <type>jar</type>
  357. </artifactItem>
  358. </artifactItems>
  359. </configuration>
  360. </execution>
  361. </executions>
  362. </plugin>
  363. <plugin>
  364. <groupId>net.alchim31.maven</groupId>
  365. <artifactId>yuicompressor-maven-plugin</artifactId>
  366. <executions>
  367. <execution>
  368. <id>compress-js</id>
  369. <phase>process-resources</phase>
  370. <goals>
  371. <!--<goal>jslint</goal>-->
  372. <goal>compress</goal>
  373. </goals>
  374. </execution>
  375. </executions>
  376. <configuration>
  377. <failOnWarning>true</failOnWarning>
  378. <!--<outputDirectory>src/main/webapp/js</outputDirectory>-->
  379. <outputDirectory>target/${artifact.name}/js</outputDirectory>
  380. <nosuffix>true</nosuffix>
  381. <excludes>
  382. <exclude>**/js/**/*js</exclude>
  383. <exclude>vendor/**</exclude>
  384. <exclude>**/*min.css</exclude>
  385. <exclude>**/*min.js</exclude>
  386. </excludes>
  387. </configuration>
  388. </plugin>
  389. <plugin>
  390. <groupId>com.github.klieber</groupId>
  391. <artifactId>phantomjs-maven-plugin</artifactId>
  392. <executions>
  393. <execution>
  394. <goals>
  395. <goal>install</goal>
  396. </goals>
  397. </execution>
  398. </executions>
  399. <configuration>
  400. <version>2.1.1</version>
  401. </configuration>
  402. </plugin>
  403. <plugin>
  404. <groupId>com.github.searls</groupId>
  405. <artifactId>jasmine-maven-plugin</artifactId>
  406. <executions>
  407. <execution>
  408. <goals>
  409. <goal>test</goal>
  410. <goal>bdd</goal>
  411. </goals>
  412. </execution>
  413. </executions>
  414. <configuration>
  415. <skipJasmineTests>${skipTests}</skipJasmineTests>
  416. <webDriverClassName>org.openqa.selenium.phantomjs.PhantomJSDriver</webDriverClassName>
  417. <webDriverCapabilities>
  418. <capability>
  419. <name>phantomjs.binary.path</name>
  420. <value>${phantomjs.binary}</value>
  421. </capability>
  422. </webDriverCapabilities>
  423. <preloadSources>
  424. <source>${vendor.loc}/jquery/dist/jquery.js</source>
  425. <source>${vendor.loc}/angular/angular.min.js</source>
  426. <source>${vendor.loc}/angular-route/angular-route.min.js</source>
  427. <source>${vendor.loc}/angular-mocks/angular-mocks.js</source>
  428. </preloadSources>
  429. <jsSrcDir>src/main/javascript</jsSrcDir>
  430. <jsTestSrcDir>src/test/javascript</jsTestSrcDir>
  431. <specIncludes>
  432. <include>${javascript.test}.js</include>
  433. </specIncludes>
  434. </configuration>
  435. </plugin>
  436. <plugin>
  437. <groupId>org.apache.rat</groupId>
  438. <artifactId>apache-rat-plugin</artifactId>
  439. <configuration>
  440. <excludes>
  441. <exclude>src/main/webapp/vendor/**</exclude>
  442. <exclude>src/main/resources/appcatalog.properties</exclude>
  443. <exclude>src/main/webapp//**/*.svg</exclude>
  444. <exclude>src/test/javascript/karma.conf.js</exclude>
  445. <exclude>src/test/resources/configsets/exampleCollection/conf/params.json</exclude>
  446. <exclude>src/test/resources/log4j.properties</exclude>
  447. <exclude>src/test/resources/jaas.config</exclude>
  448. <exclude>.bowerrc</exclude>
  449. <exclude>.yarnrc</exclude>
  450. <exclude>bower.json</exclude>
  451. <exclude>package.json</exclude>
  452. <exclude>yarn.lock</exclude>
  453. <exclude>node/**</exclude>
  454. <exclude>node_modules/**</exclude>
  455. </excludes>
  456. </configuration>
  457. </plugin>
  458. <plugin>
  459. <groupId>org.apache.maven.plugins</groupId>
  460. <artifactId>maven-javadoc-plugin</artifactId>
  461. <configuration>
  462. <excludePackageNames>org.apache.hadoop.yarn.appcatalog</excludePackageNames>
  463. </configuration>
  464. </plugin>
  465. </plugins>
  466. </build>
  467. <profiles>
  468. <profile>
  469. <id>parallel-tests</id>
  470. <build>
  471. <plugins>
  472. <plugin>
  473. <groupId>org.apache.hadoop</groupId>
  474. <artifactId>hadoop-maven-plugins</artifactId>
  475. <executions>
  476. <execution>
  477. <id>parallel-tests-createdir</id>
  478. <goals>
  479. <goal>parallel-tests-createdir</goal>
  480. </goals>
  481. </execution>
  482. </executions>
  483. </plugin>
  484. <plugin>
  485. <groupId>org.apache.maven.plugins</groupId>
  486. <artifactId>maven-surefire-plugin</artifactId>
  487. <configuration>
  488. <forkCount>${testsThreadCount}</forkCount>
  489. <reuseForks>false</reuseForks>
  490. <argLine>${maven-surefire-plugin.argLine} -DminiClusterDedicatedDirs=true</argLine>
  491. <systemPropertyVariables>
  492. <testsThreadCount>${testsThreadCount}</testsThreadCount>
  493. <test.build.data>${test.build.data}/${surefire.forkNumber}</test.build.data>
  494. <test.build.dir>${test.build.dir}/${surefire.forkNumber}</test.build.dir>
  495. <hadoop.tmp.dir>${hadoop.tmp.dir}/${surefire.forkNumber}</hadoop.tmp.dir>
  496. <!-- Due to a Maven quirk, setting this to just -->
  497. <!-- surefire.forkNumber won't do the parameter substitution. -->
  498. <!-- Putting a prefix in front of it like "fork-" makes it -->
  499. <!-- work. -->
  500. <test.unique.fork.id>fork-${surefire.forkNumber}</test.unique.fork.id>
  501. </systemPropertyVariables>
  502. </configuration>
  503. </plugin>
  504. </plugins>
  505. </build>
  506. </profile>
  507. <profile>
  508. <id>test-selector</id>
  509. <activation>
  510. <property>
  511. <name>test</name>
  512. </property>
  513. </activation>
  514. <properties>
  515. <javascript.test>${test}</javascript.test>
  516. </properties>
  517. </profile>
  518. <profile>
  519. <id>rest-docs</id>
  520. <build>
  521. <plugins>
  522. <plugin>
  523. <groupId>org.codehaus.mojo</groupId>
  524. <artifactId>exec-maven-plugin</artifactId>
  525. <executions>
  526. <execution>
  527. <id>apidocs</id>
  528. <phase>package</phase>
  529. <goals>
  530. <goal>exec</goal>
  531. </goals>
  532. <configuration>
  533. <outputFile>${project.build.directory}/apidocs.log</outputFile>
  534. <executable>${basedir}/node/node</executable>
  535. <commandlineArgs>${basedir}/node_modules/.bin/apidoc -i src/main/java -o ${project.build.directory}/site/apidocs</commandlineArgs>
  536. <silent>true</silent>
  537. </configuration>
  538. </execution>
  539. </executions>
  540. </plugin>
  541. </plugins>
  542. </build>
  543. </profile>
  544. </profiles>
  545. </project>