pom.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  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>0.0.16</version>
  118. <configuration>
  119. <workingDirectory>${ui.directory}</workingDirectory>
  120. </configuration>
  121. <executions>
  122. <execution>
  123. <id>install node and npm</id>
  124. <goals>
  125. <goal>install-node-and-npm</goal>
  126. </goals>
  127. <!-- optional: default phase is "generate-resources" -->
  128. <phase>initialize</phase>
  129. <configuration>
  130. <nodeVersion>v4.5.0</nodeVersion>
  131. <npmVersion>2.15.0</npmVersion>
  132. </configuration>
  133. </execution>
  134. <execution>
  135. <id>npm install</id>
  136. <goals>
  137. <goal>npm</goal>
  138. </goals>
  139. <phase>generate-resources</phase>
  140. <configuration>
  141. <arguments>install --unsafe-perm</arguments>
  142. </configuration>
  143. </execution>
  144. </executions>
  145. </plugin>
  146. <plugin>
  147. <artifactId>exec-maven-plugin</artifactId>
  148. <groupId>org.codehaus.mojo</groupId>
  149. <version>1.2.1</version>
  150. <executions>
  151. <execution>
  152. <id>node gyp executable</id>
  153. <phase>initialize</phase>
  154. <goals>
  155. <goal>exec</goal>
  156. </goals>
  157. <configuration>
  158. <skip>${skip.nodegyp.chmod}</skip>
  159. <workingDirectory>${ui.directory}</workingDirectory>
  160. <executable>chmod</executable>
  161. <arguments>
  162. <argument>+x</argument>
  163. <argument>${ui.directory}/node/npm/bin/node-gyp-bin/node-gyp</argument>
  164. </arguments>
  165. </configuration>
  166. </execution>
  167. <execution>
  168. <id>Bower install</id>
  169. <phase>generate-resources</phase>
  170. <goals>
  171. <goal>exec</goal>
  172. </goals>
  173. <configuration>
  174. <workingDirectory>${ui.directory}</workingDirectory>
  175. <executable>${ui.directory}/node/${node.executable}</executable>
  176. <arguments>
  177. <argument>${ui.directory}/node_modules/bower/bin/bower</argument>
  178. <argument>install</argument>
  179. <argument>--allow-root</argument>
  180. </arguments>
  181. </configuration>
  182. </execution>
  183. <execution>
  184. <id>Brunch build</id>
  185. <phase>generate-resources</phase>
  186. <goals>
  187. <goal>exec</goal>
  188. </goals>
  189. <configuration>
  190. <workingDirectory>${ui.directory}</workingDirectory>
  191. <executable>${ui.directory}/node/${node.executable}</executable>
  192. <arguments>
  193. <argument>node_modules/brunch/bin/brunch</argument>
  194. <argument>build</argument>
  195. <argument>--production</argument>
  196. </arguments>
  197. </configuration>
  198. </execution>
  199. </executions>
  200. </plugin>
  201. <plugin>
  202. <artifactId>maven-dependency-plugin</artifactId>
  203. <executions>
  204. <execution>
  205. <phase>generate-resources</phase>
  206. <goals>
  207. <goal>copy-dependencies</goal>
  208. </goals>
  209. <configuration>
  210. <outputDirectory>${project.build.directory}/lib</outputDirectory>
  211. <includeScope>runtime</includeScope>
  212. </configuration>
  213. </execution>
  214. <execution>
  215. <id>copy-artifact</id>
  216. <phase>package</phase>
  217. <goals>
  218. <goal>copy</goal>
  219. </goals>
  220. <configuration>
  221. <artifactItems>
  222. <artifactItem>
  223. <groupId>${project.groupId}</groupId>
  224. <artifactId>${project.artifactId}</artifactId>
  225. <version>${project.version}</version>
  226. <type>${project.packaging}</type>
  227. </artifactItem>
  228. </artifactItems>
  229. <outputDirectory>${views.jars.dir.rel}</outputDirectory>
  230. </configuration>
  231. </execution>
  232. </executions>
  233. </plugin>
  234. <plugin>
  235. <groupId>org.vafer</groupId>
  236. <artifactId>jdeb</artifactId>
  237. <version>1.0.1</version>
  238. <executions>
  239. <execution>
  240. <phase>none</phase>
  241. <goals>
  242. <goal>jdeb</goal>
  243. </goals>
  244. </execution>
  245. </executions>
  246. <configuration>
  247. <skip>true</skip>
  248. <submodules>false</submodules>
  249. </configuration>
  250. </plugin>
  251. </plugins>
  252. <resources>
  253. <resource>
  254. <directory>src/main/resources/ui/public</directory>
  255. <filtering>false</filtering>
  256. </resource>
  257. <resource>
  258. <directory>src/main/resources/</directory>
  259. <filtering>false</filtering>
  260. <includes>
  261. <include>view.xml</include>
  262. <include>view.log4j.properties</include>
  263. </includes>
  264. </resource>
  265. <resource>
  266. <targetPath>WEB-INF/lib</targetPath>
  267. <filtering>false</filtering>
  268. <directory>target/lib</directory>
  269. </resource>
  270. </resources>
  271. <pluginManagement>
  272. <plugins>
  273. <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
  274. <plugin>
  275. <groupId>org.eclipse.m2e</groupId>
  276. <artifactId>lifecycle-mapping</artifactId>
  277. <version>1.0.0</version>
  278. <configuration>
  279. <lifecycleMappingMetadata>
  280. <pluginExecutions>
  281. <pluginExecution>
  282. <pluginExecutionFilter>
  283. <groupId>
  284. org.codehaus.mojo
  285. </groupId>
  286. <artifactId>
  287. exec-maven-plugin
  288. </artifactId>
  289. <versionRange>
  290. [1.2.1,)
  291. </versionRange>
  292. <goals>
  293. <goal>exec</goal>
  294. </goals>
  295. </pluginExecutionFilter>
  296. <action>
  297. <ignore></ignore>
  298. </action>
  299. </pluginExecution>
  300. <pluginExecution>
  301. <pluginExecutionFilter>
  302. <groupId>
  303. com.github.eirslett
  304. </groupId>
  305. <artifactId>
  306. frontend-maven-plugin
  307. </artifactId>
  308. <versionRange>
  309. [0.0.14,)
  310. </versionRange>
  311. <goals>
  312. <goal>
  313. install-node-and-npm
  314. </goal>
  315. <goal>npm</goal>
  316. </goals>
  317. </pluginExecutionFilter>
  318. <action>
  319. <ignore></ignore>
  320. </action>
  321. </pluginExecution>
  322. </pluginExecutions>
  323. </lifecycleMappingMetadata>
  324. </configuration>
  325. </plugin>
  326. </plugins>
  327. </pluginManagement>
  328. </build>
  329. <profiles>
  330. <profile>
  331. <id>windows</id>
  332. <activation>
  333. <os>
  334. <family>win</family>
  335. </os>
  336. </activation>
  337. <properties>
  338. <node.executable>node.exe</node.executable>
  339. <skip.nodegyp.chmod>true</skip.nodegyp.chmod>
  340. </properties>
  341. </profile>
  342. <profile>
  343. <id>linux</id>
  344. <activation>
  345. <os>
  346. <family>unix</family>
  347. </os>
  348. </activation>
  349. <properties>
  350. <node.executable>node</node.executable>
  351. <skip.nodegyp.chmod>false</skip.nodegyp.chmod>
  352. </properties>
  353. </profile>
  354. </profiles>
  355. </project>