pom.xml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536
  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. </dependencies>
  230. <build>
  231. <finalName>${artifact.name}</finalName>
  232. <resources>
  233. <resource>
  234. <directory>src/main/javascript</directory>
  235. <filtering>true</filtering>
  236. </resource>
  237. <resource>
  238. <directory>src/main/resources</directory>
  239. <filtering>true</filtering>
  240. </resource>
  241. </resources>
  242. <plugins>
  243. <plugin>
  244. <groupId>com.github.eirslett</groupId>
  245. <artifactId>frontend-maven-plugin</artifactId>
  246. <configuration>
  247. <workingDirectory>target</workingDirectory>
  248. </configuration>
  249. <executions>
  250. <execution>
  251. <id>install node and yarn</id>
  252. <goals>
  253. <goal>install-node-and-yarn</goal>
  254. </goals>
  255. <phase>generate-resources</phase>
  256. <configuration>
  257. <nodeVersion>${nodejs.version}</nodeVersion>
  258. <yarnVersion>${yarnpkg.version}</yarnVersion>
  259. </configuration>
  260. </execution>
  261. <execution>
  262. <id>yarn install</id>
  263. <goals>
  264. <goal>yarn</goal>
  265. </goals>
  266. </execution>
  267. </executions>
  268. </plugin>
  269. <plugin>
  270. <groupId>org.apache.maven.plugins</groupId>
  271. <artifactId>maven-compiler-plugin</artifactId>
  272. <configuration>
  273. <compilerArguments>
  274. <endorseddirs>${endorsed.dir}</endorseddirs>
  275. </compilerArguments>
  276. </configuration>
  277. </plugin>
  278. <plugin>
  279. <groupId>org.apache.maven.plugins</groupId>
  280. <artifactId>maven-surefire-plugin</artifactId>
  281. <configuration>
  282. <systemPropertyVariables>
  283. <log4j.configuration>file:${project.build.testOutputDirectory}/log4j.properties</log4j.configuration>
  284. </systemPropertyVariables>
  285. </configuration>
  286. </plugin>
  287. <plugin>
  288. <groupId>org.apache.maven.plugins</groupId>
  289. <artifactId>maven-war-plugin</artifactId>
  290. <configuration>
  291. <failOnMissingWebXml>false</failOnMissingWebXml>
  292. <webResources>
  293. <resource>
  294. <directory>target/generated-sources</directory>
  295. <includes>
  296. <include>vendor/jquery/**</include>
  297. <include>vendor/angular/**</include>
  298. <include>vendor/angular-route/**</include>
  299. <include>vendor/bootstrap/**</include>
  300. <include>vendor/roboto-fontface/fonts/roboto/Roboto-Regular.woff</include>
  301. </includes>
  302. </resource>
  303. </webResources>
  304. </configuration>
  305. </plugin>
  306. <plugin>
  307. <groupId>org.apache.maven.plugins</groupId>
  308. <artifactId>maven-dependency-plugin</artifactId>
  309. <executions>
  310. <execution>
  311. <phase>validate</phase>
  312. <goals>
  313. <goal>copy</goal>
  314. </goals>
  315. <configuration>
  316. <outputDirectory>${endorsed.dir}</outputDirectory>
  317. <silent>true</silent>
  318. <artifactItems>
  319. <artifactItem>
  320. <groupId>javax</groupId>
  321. <artifactId>javaee-endorsed-api</artifactId>
  322. <version>7.0</version>
  323. <type>jar</type>
  324. </artifactItem>
  325. </artifactItems>
  326. </configuration>
  327. </execution>
  328. </executions>
  329. </plugin>
  330. <plugin>
  331. <groupId>net.alchim31.maven</groupId>
  332. <artifactId>yuicompressor-maven-plugin</artifactId>
  333. <executions>
  334. <execution>
  335. <id>compress-js</id>
  336. <phase>process-resources</phase>
  337. <goals>
  338. <!--<goal>jslint</goal>-->
  339. <goal>compress</goal>
  340. </goals>
  341. </execution>
  342. </executions>
  343. <configuration>
  344. <failOnWarning>true</failOnWarning>
  345. <!--<outputDirectory>src/main/webapp/js</outputDirectory>-->
  346. <outputDirectory>target/${artifact.name}/js</outputDirectory>
  347. <nosuffix>true</nosuffix>
  348. <excludes>
  349. <exclude>**/js/**/*js</exclude>
  350. <exclude>vendor/**</exclude>
  351. <exclude>**/*min.css</exclude>
  352. <exclude>**/*min.js</exclude>
  353. </excludes>
  354. </configuration>
  355. </plugin>
  356. <plugin>
  357. <groupId>com.github.klieber</groupId>
  358. <artifactId>phantomjs-maven-plugin</artifactId>
  359. <executions>
  360. <execution>
  361. <goals>
  362. <goal>install</goal>
  363. </goals>
  364. </execution>
  365. </executions>
  366. <configuration>
  367. <version>2.1.1</version>
  368. </configuration>
  369. </plugin>
  370. <plugin>
  371. <groupId>com.github.searls</groupId>
  372. <artifactId>jasmine-maven-plugin</artifactId>
  373. <executions>
  374. <execution>
  375. <goals>
  376. <goal>test</goal>
  377. <goal>bdd</goal>
  378. </goals>
  379. </execution>
  380. </executions>
  381. <configuration>
  382. <skipJasmineTests>${skipTests}</skipJasmineTests>
  383. <webDriverClassName>org.openqa.selenium.phantomjs.PhantomJSDriver</webDriverClassName>
  384. <webDriverCapabilities>
  385. <capability>
  386. <name>phantomjs.binary.path</name>
  387. <value>${phantomjs.binary}</value>
  388. </capability>
  389. </webDriverCapabilities>
  390. <preloadSources>
  391. <source>${vendor.loc}/jquery/dist/jquery.js</source>
  392. <source>${vendor.loc}/angular/angular.min.js</source>
  393. <source>${vendor.loc}/angular-route/angular-route.min.js</source>
  394. <source>${vendor.loc}/angular-mocks/angular-mocks.js</source>
  395. </preloadSources>
  396. <jsSrcDir>src/main/javascript</jsSrcDir>
  397. <jsTestSrcDir>src/test/javascript</jsTestSrcDir>
  398. <specIncludes>
  399. <include>${javascript.test}.js</include>
  400. </specIncludes>
  401. </configuration>
  402. </plugin>
  403. <plugin>
  404. <groupId>org.apache.rat</groupId>
  405. <artifactId>apache-rat-plugin</artifactId>
  406. <configuration>
  407. <excludes>
  408. <exclude>src/main/webapp/vendor/**</exclude>
  409. <exclude>src/main/resources/appcatalog.properties</exclude>
  410. <exclude>src/main/webapp//**/*.svg</exclude>
  411. <exclude>src/test/javascript/karma.conf.js</exclude>
  412. <exclude>src/test/resources/configsets/exampleCollection/conf/params.json</exclude>
  413. <exclude>src/test/resources/log4j.properties</exclude>
  414. <exclude>src/test/resources/jaas.config</exclude>
  415. <exclude>.bowerrc</exclude>
  416. <exclude>.yarnrc</exclude>
  417. <exclude>bower.json</exclude>
  418. <exclude>package.json</exclude>
  419. <exclude>yarn.lock</exclude>
  420. <exclude>node/**</exclude>
  421. <exclude>node_modules/**</exclude>
  422. </excludes>
  423. </configuration>
  424. </plugin>
  425. <plugin>
  426. <groupId>org.apache.maven.plugins</groupId>
  427. <artifactId>maven-javadoc-plugin</artifactId>
  428. <configuration>
  429. <excludePackageNames>org.apache.hadoop.yarn.appcatalog</excludePackageNames>
  430. </configuration>
  431. </plugin>
  432. </plugins>
  433. </build>
  434. <profiles>
  435. <profile>
  436. <id>parallel-tests</id>
  437. <build>
  438. <plugins>
  439. <plugin>
  440. <groupId>org.apache.hadoop</groupId>
  441. <artifactId>hadoop-maven-plugins</artifactId>
  442. <executions>
  443. <execution>
  444. <id>parallel-tests-createdir</id>
  445. <goals>
  446. <goal>parallel-tests-createdir</goal>
  447. </goals>
  448. </execution>
  449. </executions>
  450. </plugin>
  451. <plugin>
  452. <groupId>org.apache.maven.plugins</groupId>
  453. <artifactId>maven-surefire-plugin</artifactId>
  454. <configuration>
  455. <forkCount>${testsThreadCount}</forkCount>
  456. <reuseForks>false</reuseForks>
  457. <argLine>${maven-surefire-plugin.argLine} -DminiClusterDedicatedDirs=true</argLine>
  458. <systemPropertyVariables>
  459. <testsThreadCount>${testsThreadCount}</testsThreadCount>
  460. <test.build.data>${test.build.data}/${surefire.forkNumber}</test.build.data>
  461. <test.build.dir>${test.build.dir}/${surefire.forkNumber}</test.build.dir>
  462. <hadoop.tmp.dir>${hadoop.tmp.dir}/${surefire.forkNumber}</hadoop.tmp.dir>
  463. <!-- Due to a Maven quirk, setting this to just -->
  464. <!-- surefire.forkNumber won't do the parameter substitution. -->
  465. <!-- Putting a prefix in front of it like "fork-" makes it -->
  466. <!-- work. -->
  467. <test.unique.fork.id>fork-${surefire.forkNumber}</test.unique.fork.id>
  468. </systemPropertyVariables>
  469. </configuration>
  470. </plugin>
  471. </plugins>
  472. </build>
  473. </profile>
  474. <profile>
  475. <id>test-selector</id>
  476. <activation>
  477. <property>
  478. <name>test</name>
  479. </property>
  480. </activation>
  481. <properties>
  482. <javascript.test>${test}</javascript.test>
  483. </properties>
  484. </profile>
  485. <profile>
  486. <id>rest-docs</id>
  487. <build>
  488. <plugins>
  489. <plugin>
  490. <groupId>org.codehaus.mojo</groupId>
  491. <artifactId>exec-maven-plugin</artifactId>
  492. <executions>
  493. <execution>
  494. <id>apidocs</id>
  495. <phase>package</phase>
  496. <goals>
  497. <goal>exec</goal>
  498. </goals>
  499. <configuration>
  500. <outputFile>${project.build.directory}/apidocs.log</outputFile>
  501. <executable>${basedir}/node/node</executable>
  502. <commandlineArgs>${basedir}/node_modules/.bin/apidoc -i src/main/java -o ${project.build.directory}/site/apidocs</commandlineArgs>
  503. <silent>true</silent>
  504. </configuration>
  505. </execution>
  506. </executions>
  507. </plugin>
  508. </plugins>
  509. </build>
  510. </profile>
  511. </profiles>
  512. </project>