pom.xml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541
  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.3.4</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>junit</groupId>
  40. <artifactId>junit</artifactId>
  41. <scope>test</scope>
  42. </dependency>
  43. <dependency>
  44. <groupId>io.swagger</groupId>
  45. <artifactId>swagger-annotations</artifactId>
  46. </dependency>
  47. <dependency>
  48. <groupId>org.mockito</groupId>
  49. <artifactId>mockito-all</artifactId>
  50. <version>1.9.5</version>
  51. <scope>test</scope>
  52. </dependency>
  53. <dependency>
  54. <groupId>org.powermock</groupId>
  55. <artifactId>powermock-module-junit4</artifactId>
  56. <version>${powermock.version}</version>
  57. <scope>test</scope>
  58. </dependency>
  59. <dependency>
  60. <groupId>org.powermock</groupId>
  61. <artifactId>powermock-api-mockito</artifactId>
  62. <version>${powermock.version}</version>
  63. <exclusions>
  64. <exclusion>
  65. <groupId>org.mockito</groupId>
  66. <artifactId>mockito-all</artifactId>
  67. </exclusion>
  68. </exclusions>
  69. <scope>test</scope>
  70. </dependency>
  71. <dependency>
  72. <groupId>org.glassfish.jersey.media</groupId>
  73. <artifactId>jersey-media-json-jackson</artifactId>
  74. <version>2.12</version>
  75. <scope>test</scope>
  76. <exclusions>
  77. <exclusion>
  78. <groupId>org.javassist</groupId>
  79. <artifactId>javassist</artifactId>
  80. </exclusion>
  81. <exclusion>
  82. <groupId>com.fasterxml.jackson.jaxrs</groupId>
  83. <artifactId>jackson-jaxrs-base</artifactId>
  84. </exclusion>
  85. </exclusions>
  86. </dependency>
  87. <dependency>
  88. <groupId>com.sun.jersey</groupId>
  89. <artifactId>jersey-json</artifactId>
  90. <version>${jersey.version}</version>
  91. </dependency>
  92. <dependency>
  93. <groupId>org.apache.solr</groupId>
  94. <artifactId>solr-solrj</artifactId>
  95. <version>${solr.version}</version>
  96. <exclusions>
  97. <exclusion>
  98. <groupId>org.slf4j</groupId>
  99. <artifactId>jcl-over-slf4j</artifactId>
  100. </exclusion>
  101. <exclusion>
  102. <groupId>org.slf4j</groupId>
  103. <artifactId>slf4j-api</artifactId>
  104. </exclusion>
  105. <exclusion>
  106. <groupId>org.eclipse.jetty</groupId>
  107. <artifactId>jetty-http</artifactId>
  108. </exclusion>
  109. <exclusion>
  110. <groupId>org.eclipse.jetty</groupId>
  111. <artifactId>jetty-client</artifactId>
  112. </exclusion>
  113. <exclusion>
  114. <groupId>org.eclipse.jetty</groupId>
  115. <artifactId>jetty-io</artifactId>
  116. </exclusion>
  117. </exclusions>
  118. </dependency>
  119. <dependency>
  120. <groupId>org.apache.solr</groupId>
  121. <artifactId>solr-core</artifactId>
  122. <version>${solr.version}</version>
  123. <exclusions>
  124. <exclusion>
  125. <groupId>org.slf4j</groupId>
  126. <artifactId>jcl-over-slf4j</artifactId>
  127. </exclusion>
  128. <exclusion>
  129. <groupId>org.eclipse.jetty</groupId>
  130. <artifactId>jetty-io</artifactId>
  131. </exclusion>
  132. <exclusion>
  133. <groupId>org.eclipse.jetty</groupId>
  134. <artifactId>jetty-xml</artifactId>
  135. </exclusion>
  136. <exclusion>
  137. <groupId>org.eclipse.jetty</groupId>
  138. <artifactId>jetty-http</artifactId>
  139. </exclusion>
  140. <exclusion>
  141. <groupId>org.eclipse.jetty</groupId>
  142. <artifactId>jetty-client</artifactId>
  143. </exclusion>
  144. </exclusions>
  145. <scope>test</scope>
  146. </dependency>
  147. <dependency>
  148. <groupId>org.apache.solr</groupId>
  149. <artifactId>solr-test-framework</artifactId>
  150. <version>${solr.version}</version>
  151. <exclusions>
  152. <exclusion>
  153. <groupId>org.slf4j</groupId>
  154. <artifactId>jcl-over-slf4j</artifactId>
  155. </exclusion>
  156. <exclusion>
  157. <groupId>org.eclipse.jetty</groupId>
  158. <artifactId>jetty-io</artifactId>
  159. </exclusion>
  160. <exclusion>
  161. <groupId>org.eclipse.jetty</groupId>
  162. <artifactId>jetty-xml</artifactId>
  163. </exclusion>
  164. <exclusion>
  165. <groupId>org.eclipse.jetty</groupId>
  166. <artifactId>jetty-http</artifactId>
  167. </exclusion>
  168. <exclusion>
  169. <groupId>org.eclipse.jetty</groupId>
  170. <artifactId>jetty-client</artifactId>
  171. </exclusion>
  172. </exclusions>
  173. <scope>test</scope>
  174. </dependency>
  175. <dependency>
  176. <groupId>org.slf4j</groupId>
  177. <artifactId>jcl-over-slf4j</artifactId>
  178. <version>${slf4j.version}</version>
  179. </dependency>
  180. <dependency>
  181. <groupId>org.slf4j</groupId>
  182. <artifactId>slf4j-api</artifactId>
  183. <version>${slf4j.version}</version>
  184. </dependency>
  185. <dependency>
  186. <groupId>org.apache.hadoop</groupId>
  187. <artifactId>hadoop-common</artifactId>
  188. </dependency>
  189. <dependency>
  190. <groupId>org.apache.hadoop</groupId>
  191. <artifactId>hadoop-auth</artifactId>
  192. </dependency>
  193. <dependency>
  194. <groupId>org.apache.hadoop</groupId>
  195. <artifactId>hadoop-yarn-common</artifactId>
  196. </dependency>
  197. <dependency>
  198. <groupId>org.apache.hadoop</groupId>
  199. <artifactId>hadoop-yarn-services-core</artifactId>
  200. </dependency>
  201. <dependency>
  202. <groupId>org.apache.hadoop</groupId>
  203. <artifactId>hadoop-yarn-services-api</artifactId>
  204. </dependency>
  205. <dependency>
  206. <groupId>com.fasterxml.jackson.core</groupId>
  207. <artifactId>jackson-core</artifactId>
  208. <version>${jackson2.version}</version>
  209. </dependency>
  210. <dependency>
  211. <groupId>com.fasterxml.jackson.core</groupId>
  212. <artifactId>jackson-annotations</artifactId>
  213. <version>${jackson2.version}</version>
  214. </dependency>
  215. <dependency>
  216. <groupId>com.fasterxml.jackson.core</groupId>
  217. <artifactId>jackson-databind</artifactId>
  218. </dependency>
  219. <dependency>
  220. <groupId>com.fasterxml.jackson.jaxrs</groupId>
  221. <artifactId>jackson-jaxrs-json-provider</artifactId>
  222. <version>${jackson2.version}</version>
  223. </dependency>
  224. <dependency>
  225. <groupId>com.fasterxml.jackson.jaxrs</groupId>
  226. <artifactId>jackson-jaxrs-base</artifactId>
  227. <version>${jackson2.version}</version>
  228. </dependency>
  229. <dependency>
  230. <groupId>javax.ws.rs</groupId>
  231. <artifactId>javax.ws.rs-api</artifactId>
  232. </dependency>
  233. </dependencies>
  234. <build>
  235. <finalName>${artifact.name}</finalName>
  236. <resources>
  237. <resource>
  238. <directory>src/main/javascript</directory>
  239. <filtering>true</filtering>
  240. </resource>
  241. <resource>
  242. <directory>src/main/resources</directory>
  243. <filtering>true</filtering>
  244. </resource>
  245. </resources>
  246. <plugins>
  247. <plugin>
  248. <groupId>com.github.eirslett</groupId>
  249. <artifactId>frontend-maven-plugin</artifactId>
  250. <configuration>
  251. <workingDirectory>target</workingDirectory>
  252. </configuration>
  253. <executions>
  254. <execution>
  255. <id>install node and yarn</id>
  256. <goals>
  257. <goal>install-node-and-yarn</goal>
  258. </goals>
  259. <phase>generate-resources</phase>
  260. <configuration>
  261. <nodeVersion>${nodejs.version}</nodeVersion>
  262. <yarnVersion>${yarnpkg.version}</yarnVersion>
  263. </configuration>
  264. </execution>
  265. <execution>
  266. <id>yarn install</id>
  267. <goals>
  268. <goal>yarn</goal>
  269. </goals>
  270. </execution>
  271. </executions>
  272. </plugin>
  273. <plugin>
  274. <groupId>org.apache.maven.plugins</groupId>
  275. <artifactId>maven-compiler-plugin</artifactId>
  276. <configuration>
  277. <compilerArguments>
  278. <endorseddirs>${endorsed.dir}</endorseddirs>
  279. </compilerArguments>
  280. </configuration>
  281. </plugin>
  282. <plugin>
  283. <groupId>org.apache.maven.plugins</groupId>
  284. <artifactId>maven-surefire-plugin</artifactId>
  285. <configuration>
  286. <systemPropertyVariables>
  287. <log4j.configuration>file:${project.build.testOutputDirectory}/log4j.properties</log4j.configuration>
  288. </systemPropertyVariables>
  289. </configuration>
  290. </plugin>
  291. <plugin>
  292. <groupId>org.apache.maven.plugins</groupId>
  293. <artifactId>maven-war-plugin</artifactId>
  294. <configuration>
  295. <failOnMissingWebXml>false</failOnMissingWebXml>
  296. <webResources>
  297. <resource>
  298. <directory>target/generated-sources</directory>
  299. <includes>
  300. <include>vendor/jquery/**</include>
  301. <include>vendor/angular/**</include>
  302. <include>vendor/angular-route/**</include>
  303. <include>vendor/bootstrap/**</include>
  304. <include>vendor/roboto-fontface/fonts/roboto/Roboto-Regular.woff</include>
  305. </includes>
  306. </resource>
  307. </webResources>
  308. </configuration>
  309. </plugin>
  310. <plugin>
  311. <groupId>org.apache.maven.plugins</groupId>
  312. <artifactId>maven-dependency-plugin</artifactId>
  313. <executions>
  314. <execution>
  315. <phase>validate</phase>
  316. <goals>
  317. <goal>copy</goal>
  318. </goals>
  319. <configuration>
  320. <outputDirectory>${endorsed.dir}</outputDirectory>
  321. <silent>true</silent>
  322. <artifactItems>
  323. <artifactItem>
  324. <groupId>javax</groupId>
  325. <artifactId>javaee-endorsed-api</artifactId>
  326. <version>7.0</version>
  327. <type>jar</type>
  328. </artifactItem>
  329. </artifactItems>
  330. </configuration>
  331. </execution>
  332. </executions>
  333. </plugin>
  334. <plugin>
  335. <groupId>net.alchim31.maven</groupId>
  336. <artifactId>yuicompressor-maven-plugin</artifactId>
  337. <executions>
  338. <execution>
  339. <id>compress-js</id>
  340. <phase>process-resources</phase>
  341. <goals>
  342. <!--<goal>jslint</goal>-->
  343. <goal>compress</goal>
  344. </goals>
  345. </execution>
  346. </executions>
  347. <configuration>
  348. <failOnWarning>true</failOnWarning>
  349. <!--<outputDirectory>src/main/webapp/js</outputDirectory>-->
  350. <outputDirectory>target/${artifact.name}/js</outputDirectory>
  351. <nosuffix>true</nosuffix>
  352. <excludes>
  353. <exclude>**/js/**/*js</exclude>
  354. <exclude>vendor/**</exclude>
  355. <exclude>**/*min.css</exclude>
  356. <exclude>**/*min.js</exclude>
  357. </excludes>
  358. </configuration>
  359. </plugin>
  360. <plugin>
  361. <groupId>com.github.klieber</groupId>
  362. <artifactId>phantomjs-maven-plugin</artifactId>
  363. <executions>
  364. <execution>
  365. <goals>
  366. <goal>install</goal>
  367. </goals>
  368. </execution>
  369. </executions>
  370. <configuration>
  371. <version>2.1.1</version>
  372. </configuration>
  373. </plugin>
  374. <plugin>
  375. <groupId>com.github.searls</groupId>
  376. <artifactId>jasmine-maven-plugin</artifactId>
  377. <executions>
  378. <execution>
  379. <goals>
  380. <goal>test</goal>
  381. <goal>bdd</goal>
  382. </goals>
  383. </execution>
  384. </executions>
  385. <configuration>
  386. <skipJasmineTests>${skipTests}</skipJasmineTests>
  387. <webDriverClassName>org.openqa.selenium.phantomjs.PhantomJSDriver</webDriverClassName>
  388. <webDriverCapabilities>
  389. <capability>
  390. <name>phantomjs.binary.path</name>
  391. <value>${phantomjs.binary}</value>
  392. </capability>
  393. </webDriverCapabilities>
  394. <preloadSources>
  395. <source>${vendor.loc}/jquery/dist/jquery.js</source>
  396. <source>${vendor.loc}/angular/angular.min.js</source>
  397. <source>${vendor.loc}/angular-route/angular-route.min.js</source>
  398. <source>${vendor.loc}/angular-mocks/angular-mocks.js</source>
  399. </preloadSources>
  400. <jsSrcDir>src/main/javascript</jsSrcDir>
  401. <jsTestSrcDir>src/test/javascript</jsTestSrcDir>
  402. <specIncludes>
  403. <include>${javascript.test}.js</include>
  404. </specIncludes>
  405. </configuration>
  406. </plugin>
  407. <plugin>
  408. <groupId>org.apache.rat</groupId>
  409. <artifactId>apache-rat-plugin</artifactId>
  410. <configuration>
  411. <excludes>
  412. <exclude>src/main/webapp/vendor/**</exclude>
  413. <exclude>src/main/resources/appcatalog.properties</exclude>
  414. <exclude>src/main/webapp//**/*.svg</exclude>
  415. <exclude>src/test/javascript/karma.conf.js</exclude>
  416. <exclude>src/test/resources/configsets/exampleCollection/conf/params.json</exclude>
  417. <exclude>src/test/resources/log4j.properties</exclude>
  418. <exclude>src/test/resources/jaas.config</exclude>
  419. <exclude>.bowerrc</exclude>
  420. <exclude>.yarnrc</exclude>
  421. <exclude>bower.json</exclude>
  422. <exclude>package.json</exclude>
  423. <exclude>yarn.lock</exclude>
  424. <exclude>node/**</exclude>
  425. <exclude>node_modules/**</exclude>
  426. </excludes>
  427. </configuration>
  428. </plugin>
  429. <plugin>
  430. <groupId>org.apache.maven.plugins</groupId>
  431. <artifactId>maven-javadoc-plugin</artifactId>
  432. <configuration>
  433. <excludePackageNames>org.apache.hadoop.yarn.appcatalog</excludePackageNames>
  434. </configuration>
  435. </plugin>
  436. </plugins>
  437. </build>
  438. <profiles>
  439. <profile>
  440. <id>parallel-tests</id>
  441. <build>
  442. <plugins>
  443. <plugin>
  444. <groupId>org.apache.hadoop</groupId>
  445. <artifactId>hadoop-maven-plugins</artifactId>
  446. <executions>
  447. <execution>
  448. <id>parallel-tests-createdir</id>
  449. <goals>
  450. <goal>parallel-tests-createdir</goal>
  451. </goals>
  452. </execution>
  453. </executions>
  454. </plugin>
  455. <plugin>
  456. <groupId>org.apache.maven.plugins</groupId>
  457. <artifactId>maven-surefire-plugin</artifactId>
  458. <configuration>
  459. <forkCount>${testsThreadCount}</forkCount>
  460. <reuseForks>false</reuseForks>
  461. <argLine>${maven-surefire-plugin.argLine} -DminiClusterDedicatedDirs=true</argLine>
  462. <systemPropertyVariables>
  463. <testsThreadCount>${testsThreadCount}</testsThreadCount>
  464. <test.build.data>${test.build.data}/${surefire.forkNumber}</test.build.data>
  465. <test.build.dir>${test.build.dir}/${surefire.forkNumber}</test.build.dir>
  466. <hadoop.tmp.dir>${hadoop.tmp.dir}/${surefire.forkNumber}</hadoop.tmp.dir>
  467. <!-- Due to a Maven quirk, setting this to just -->
  468. <!-- surefire.forkNumber won't do the parameter substitution. -->
  469. <!-- Putting a prefix in front of it like "fork-" makes it -->
  470. <!-- work. -->
  471. <test.unique.fork.id>fork-${surefire.forkNumber}</test.unique.fork.id>
  472. </systemPropertyVariables>
  473. </configuration>
  474. </plugin>
  475. </plugins>
  476. </build>
  477. </profile>
  478. <profile>
  479. <id>test-selector</id>
  480. <activation>
  481. <property>
  482. <name>test</name>
  483. </property>
  484. </activation>
  485. <properties>
  486. <javascript.test>${test}</javascript.test>
  487. </properties>
  488. </profile>
  489. <profile>
  490. <id>rest-docs</id>
  491. <build>
  492. <plugins>
  493. <plugin>
  494. <groupId>org.codehaus.mojo</groupId>
  495. <artifactId>exec-maven-plugin</artifactId>
  496. <executions>
  497. <execution>
  498. <id>apidocs</id>
  499. <phase>package</phase>
  500. <goals>
  501. <goal>exec</goal>
  502. </goals>
  503. <configuration>
  504. <outputFile>${project.build.directory}/apidocs.log</outputFile>
  505. <executable>${basedir}/node/node</executable>
  506. <commandlineArgs>${basedir}/node_modules/.bin/apidoc -i src/main/java -o ${project.build.directory}/site/apidocs</commandlineArgs>
  507. <silent>true</silent>
  508. </configuration>
  509. </execution>
  510. </executions>
  511. </plugin>
  512. </plugins>
  513. </build>
  514. </profile>
  515. </profiles>
  516. </project>