pom.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353
  1. <!--
  2. Licensed to the Apache Software Foundation (ASF) under one or more
  3. contributor license agreements. See the NOTICE file distributed with
  4. this work for additional information regarding copyright ownership.
  5. The ASF licenses this file to You under the Apache License, Version 2.0
  6. (the "License"); you may not use this file except in compliance with
  7. the License. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. See the License for the specific language governing permissions and
  13. limitations under the License.
  14. -->
  15. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  16. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  17. <modelVersion>4.0.0</modelVersion>
  18. <groupId>org.apache.ambari.contrib.views</groupId>
  19. <artifactId>capacity-scheduler</artifactId>
  20. <version>1.0.0.0-SNAPSHOT</version>
  21. <name>Capacity Scheduler</name>
  22. <parent>
  23. <groupId>org.apache.ambari.contrib.views</groupId>
  24. <artifactId>ambari-contrib-views</artifactId>
  25. <version>2.5.0.0.0</version>
  26. </parent>
  27. <dependencies>
  28. <dependency>
  29. <groupId>com.google.inject</groupId>
  30. <artifactId>guice</artifactId>
  31. <version>4.0-beta</version> <!-- version -->
  32. </dependency>
  33. <dependency>
  34. <groupId>org.glassfish.jersey.containers</groupId>
  35. <artifactId>jersey-container-servlet</artifactId>
  36. </dependency>
  37. <dependency>
  38. <groupId>org.apache.hadoop</groupId>
  39. <artifactId>hadoop-common</artifactId>
  40. <version>${hadoop.version}</version>
  41. <exclusions>
  42. <exclusion>
  43. <groupId>tomcat</groupId>
  44. <artifactId>jasper-runtime</artifactId>
  45. </exclusion>
  46. </exclusions>
  47. </dependency>
  48. <dependency>
  49. <groupId>commons-io</groupId>
  50. <artifactId>commons-io</artifactId>
  51. <version>2.4</version>
  52. </dependency>
  53. <dependency>
  54. <groupId>commons-lang</groupId>
  55. <artifactId>commons-lang</artifactId>
  56. <version>2.2</version>
  57. </dependency>
  58. <dependency>
  59. <groupId>com.googlecode.json-simple</groupId>
  60. <artifactId>json-simple</artifactId>
  61. </dependency>
  62. <dependency>
  63. <groupId>commons-codec</groupId>
  64. <artifactId>commons-codec</artifactId>
  65. <version>1.9</version>
  66. </dependency>
  67. <dependency>
  68. <groupId>commons-validator</groupId>
  69. <artifactId>commons-validator</artifactId>
  70. <version>1.4.1</version>
  71. </dependency>
  72. <dependency>
  73. <groupId>org.apache.ambari</groupId>
  74. <artifactId>ambari-views</artifactId>
  75. <scope>provided</scope>
  76. </dependency>
  77. <dependency>
  78. <groupId>org.apache.ambari.contrib.views</groupId>
  79. <artifactId>ambari-views-utils</artifactId>
  80. <version>2.5.0.0.0</version>
  81. </dependency>
  82. <dependency>
  83. <groupId>org.easymock</groupId>
  84. <artifactId>easymock</artifactId>
  85. <version>3.2</version>
  86. <scope>test</scope>
  87. </dependency>
  88. </dependencies>
  89. <properties>
  90. <ambari.dir>${project.parent.parent.parent.basedir}</ambari.dir>
  91. <ui.directory>${basedir}/src/main/resources/ui</ui.directory>
  92. </properties>
  93. <build>
  94. <plugins>
  95. <plugin>
  96. <groupId>org.apache.maven.plugins</groupId>
  97. <artifactId>maven-clean-plugin</artifactId>
  98. <version>2.5</version>
  99. <configuration>
  100. <filesets>
  101. <fileset>
  102. <directory>${ui.directory}</directory>
  103. <followSymlinks>false</followSymlinks>
  104. <includes>
  105. <include>public/**</include>
  106. <include>node_modules/**</include>
  107. <include>bower_components/**</include>
  108. <include>node/**</include>
  109. </includes>
  110. </fileset>
  111. </filesets>
  112. </configuration>
  113. </plugin>
  114. <plugin>
  115. <groupId>com.github.eirslett</groupId>
  116. <artifactId>frontend-maven-plugin</artifactId>
  117. <version>1.4</version>
  118. <configuration>
  119. <yarnVersion>v0.23.2</yarnVersion>
  120. <workingDirectory>${ui.directory}</workingDirectory>
  121. <npmInheritsProxyConfigFromMaven>false</npmInheritsProxyConfigFromMaven>
  122. <!-- setting npm_config_tmp environment variable is a workaround for
  123. https://github.com/Medium/phantomjs/issues/673 -->
  124. <environmentVariables>
  125. <npm_config_tmp>/tmp/npm_config_tmp</npm_config_tmp>
  126. </environmentVariables>
  127. </configuration>
  128. <executions>
  129. <execution>
  130. <id>install node and yarn</id>
  131. <goals>
  132. <goal>install-node-and-yarn</goal>
  133. </goals>
  134. <!-- optional: default phase is "generate-resources" -->
  135. <phase>initialize</phase>
  136. <configuration>
  137. <nodeVersion>v4.5.0</nodeVersion>
  138. <npmVersion>2.15.0</npmVersion>
  139. </configuration>
  140. </execution>
  141. <execution>
  142. <id>yarn install</id>
  143. <goals>
  144. <goal>yarn</goal>
  145. </goals>
  146. <phase>generate-resources</phase>
  147. <configuration>
  148. <arguments>install --unsafe-perm</arguments>
  149. </configuration>
  150. </execution>
  151. </executions>
  152. </plugin>
  153. <plugin>
  154. <artifactId>exec-maven-plugin</artifactId>
  155. <groupId>org.codehaus.mojo</groupId>
  156. <version>1.2.1</version>
  157. <executions>
  158. <execution>
  159. <id>Bower install</id>
  160. <phase>generate-resources</phase>
  161. <goals>
  162. <goal>exec</goal>
  163. </goals>
  164. <configuration>
  165. <workingDirectory>${ui.directory}</workingDirectory>
  166. <executable>${ui.directory}/node/${node.executable}</executable>
  167. <arguments>
  168. <argument>${ui.directory}/node_modules/bower/bin/bower</argument>
  169. <argument>install</argument>
  170. <argument>--allow-root</argument>
  171. </arguments>
  172. </configuration>
  173. </execution>
  174. <execution>
  175. <id>Brunch build</id>
  176. <phase>generate-resources</phase>
  177. <goals>
  178. <goal>exec</goal>
  179. </goals>
  180. <configuration>
  181. <workingDirectory>${ui.directory}</workingDirectory>
  182. <executable>${ui.directory}/node/${node.executable}</executable>
  183. <arguments>
  184. <argument>node_modules/brunch/bin/brunch</argument>
  185. <argument>build</argument>
  186. <argument>--production</argument>
  187. </arguments>
  188. </configuration>
  189. </execution>
  190. </executions>
  191. </plugin>
  192. <plugin>
  193. <artifactId>maven-dependency-plugin</artifactId>
  194. <executions>
  195. <execution>
  196. <phase>generate-resources</phase>
  197. <goals>
  198. <goal>copy-dependencies</goal>
  199. </goals>
  200. <configuration>
  201. <outputDirectory>${project.build.directory}/lib</outputDirectory>
  202. <includeScope>runtime</includeScope>
  203. </configuration>
  204. </execution>
  205. <execution>
  206. <id>copy-artifact</id>
  207. <phase>package</phase>
  208. <goals>
  209. <goal>copy</goal>
  210. </goals>
  211. <configuration>
  212. <artifactItems>
  213. <artifactItem>
  214. <groupId>${project.groupId}</groupId>
  215. <artifactId>${project.artifactId}</artifactId>
  216. <version>${project.version}</version>
  217. <type>${project.packaging}</type>
  218. </artifactItem>
  219. </artifactItems>
  220. <outputDirectory>${views.jars.dir.rel}</outputDirectory>
  221. </configuration>
  222. </execution>
  223. </executions>
  224. </plugin>
  225. <plugin>
  226. <groupId>org.vafer</groupId>
  227. <artifactId>jdeb</artifactId>
  228. <version>1.0.1</version>
  229. <executions>
  230. <execution>
  231. <phase>none</phase>
  232. <goals>
  233. <goal>jdeb</goal>
  234. </goals>
  235. </execution>
  236. </executions>
  237. <configuration>
  238. <skip>true</skip>
  239. <submodules>false</submodules>
  240. </configuration>
  241. </plugin>
  242. </plugins>
  243. <resources>
  244. <resource>
  245. <directory>src/main/resources/ui/public</directory>
  246. <filtering>false</filtering>
  247. </resource>
  248. <resource>
  249. <directory>src/main/resources/</directory>
  250. <filtering>false</filtering>
  251. <includes>
  252. <include>view.xml</include>
  253. <include>view.log4j.properties</include>
  254. </includes>
  255. </resource>
  256. <resource>
  257. <targetPath>WEB-INF/lib</targetPath>
  258. <filtering>false</filtering>
  259. <directory>target/lib</directory>
  260. </resource>
  261. </resources>
  262. <pluginManagement>
  263. <plugins>
  264. <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
  265. <plugin>
  266. <groupId>org.eclipse.m2e</groupId>
  267. <artifactId>lifecycle-mapping</artifactId>
  268. <version>1.0.0</version>
  269. <configuration>
  270. <lifecycleMappingMetadata>
  271. <pluginExecutions>
  272. <pluginExecution>
  273. <pluginExecutionFilter>
  274. <groupId>
  275. org.codehaus.mojo
  276. </groupId>
  277. <artifactId>
  278. exec-maven-plugin
  279. </artifactId>
  280. <versionRange>
  281. [1.2.1,)
  282. </versionRange>
  283. <goals>
  284. <goal>exec</goal>
  285. </goals>
  286. </pluginExecutionFilter>
  287. <action>
  288. <ignore></ignore>
  289. </action>
  290. </pluginExecution>
  291. <pluginExecution>
  292. <pluginExecutionFilter>
  293. <groupId>
  294. com.github.eirslett
  295. </groupId>
  296. <artifactId>
  297. frontend-maven-plugin
  298. </artifactId>
  299. <versionRange>
  300. [0.0.14,)
  301. </versionRange>
  302. <goals>
  303. <goal>
  304. install-node-and-npm
  305. </goal>
  306. <goal>npm</goal>
  307. </goals>
  308. </pluginExecutionFilter>
  309. <action>
  310. <ignore></ignore>
  311. </action>
  312. </pluginExecution>
  313. </pluginExecutions>
  314. </lifecycleMappingMetadata>
  315. </configuration>
  316. </plugin>
  317. </plugins>
  318. </pluginManagement>
  319. </build>
  320. <profiles>
  321. <profile>
  322. <id>windows</id>
  323. <activation>
  324. <os>
  325. <family>win</family>
  326. </os>
  327. </activation>
  328. <properties>
  329. <node.executable>node.exe</node.executable>
  330. <skip.nodegyp.chmod>true</skip.nodegyp.chmod>
  331. </properties>
  332. </profile>
  333. <profile>
  334. <id>linux</id>
  335. <activation>
  336. <os>
  337. <family>unix</family>
  338. </os>
  339. </activation>
  340. <properties>
  341. <node.executable>node</node.executable>
  342. <skip.nodegyp.chmod>false</skip.nodegyp.chmod>
  343. </properties>
  344. </profile>
  345. </profiles>
  346. </project>