1
0

pom.xml 19 KB

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