pom.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361
  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>files</artifactId>
  20. <version>1.0.0.0-SNAPSHOT</version>
  21. <name>Files</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>org.apache.hadoop</groupId>
  30. <artifactId>hadoop-hdfs</artifactId>
  31. <version>${hadoop.version}</version>
  32. <exclusions>
  33. <exclusion>
  34. <groupId>tomcat</groupId>
  35. <artifactId>jasper-runtime</artifactId>
  36. </exclusion>
  37. </exclusions>
  38. </dependency>
  39. <dependency>
  40. <groupId>org.apache.hadoop</groupId>
  41. <artifactId>hadoop-common</artifactId>
  42. <version>${hadoop.version}</version>
  43. <exclusions>
  44. <exclusion>
  45. <groupId>tomcat</groupId>
  46. <artifactId>jasper-runtime</artifactId>
  47. </exclusion>
  48. </exclusions>
  49. </dependency>
  50. <dependency>
  51. <groupId>junit</groupId>
  52. <artifactId>junit</artifactId>
  53. <scope>test</scope>
  54. </dependency>
  55. <dependency>
  56. <groupId>org.easymock</groupId>
  57. <artifactId>easymock</artifactId>
  58. <scope>test</scope>
  59. </dependency>
  60. <dependency>
  61. <groupId>com.google.inject</groupId>
  62. <artifactId>guice</artifactId>
  63. </dependency>
  64. <dependency>
  65. <groupId>com.sun.jersey.contribs</groupId>
  66. <artifactId>jersey-multipart</artifactId>
  67. </dependency>
  68. <dependency>
  69. <groupId>com.googlecode.json-simple</groupId>
  70. <artifactId>json-simple</artifactId>
  71. </dependency>
  72. <dependency>
  73. <groupId>org.apache.hadoop</groupId>
  74. <artifactId>hadoop-minicluster</artifactId>
  75. <version>${hadoop.version}</version>
  76. <scope>test</scope>
  77. </dependency>
  78. <dependency>
  79. <groupId>com.sun.jersey.jersey-test-framework</groupId>
  80. <artifactId>jersey-test-framework-core</artifactId>
  81. <scope>test</scope>
  82. </dependency>
  83. <dependency>
  84. <groupId>org.apache.ambari</groupId>
  85. <artifactId>ambari-views</artifactId>
  86. <scope>provided</scope>
  87. </dependency>
  88. <dependency>
  89. <groupId>org.apache.ambari.contrib.views</groupId>
  90. <artifactId>ambari-views-utils</artifactId>
  91. <version>2.5.0.0.0</version>
  92. </dependency>
  93. <dependency>
  94. <groupId>org.apache.ambari.contrib.views</groupId>
  95. <artifactId>ambari-views-commons</artifactId>
  96. <version>2.5.0.0.0</version>
  97. </dependency>
  98. <dependency>
  99. <groupId>com.google.code.gson</groupId>
  100. <artifactId>gson</artifactId>
  101. <version>2.2.2</version>
  102. </dependency>
  103. <dependency>
  104. <groupId>org.glassfish.jersey.containers</groupId>
  105. <artifactId>jersey-container-servlet</artifactId>
  106. <scope>provided</scope>
  107. </dependency>
  108. <dependency>
  109. <groupId>commons-io</groupId>
  110. <artifactId>commons-io</artifactId>
  111. <version>2.4</version>
  112. </dependency>
  113. </dependencies>
  114. <properties>
  115. <ambari.dir>${project.parent.parent.parent.basedir}</ambari.dir>
  116. <nodejs.directory>${basedir}/target/nodejs</nodejs.directory>
  117. <npm.version>1.4.3</npm.version>
  118. <ui.directory>${basedir}/src/main/resources/ui</ui.directory>
  119. </properties>
  120. <build>
  121. <plugins>
  122. <plugin>
  123. <groupId>org.apache.maven.plugins</groupId>
  124. <artifactId>maven-clean-plugin</artifactId>
  125. <version>2.5</version>
  126. <configuration>
  127. <filesets>
  128. <fileset>
  129. <directory>${ui.directory}</directory>
  130. <followSymlinks>false</followSymlinks>
  131. <includes>
  132. <include>tmp/**</include>
  133. <!--
  134. <include>node_modules/**</include>
  135. <include>bower_components/**</include>
  136. -->
  137. <include>node/**</include>
  138. </includes>
  139. </fileset>
  140. </filesets>
  141. </configuration>
  142. </plugin>
  143. <!-- Building frontend -->
  144. <plugin>
  145. <groupId>com.github.eirslett</groupId>
  146. <artifactId>frontend-maven-plugin</artifactId>
  147. <version>0.0.16</version>
  148. <configuration>
  149. <nodeVersion>v4.5.0</nodeVersion>
  150. <npmVersion>2.15.0</npmVersion>
  151. <workingDirectory>src/main/resources/ui/</workingDirectory>
  152. </configuration>
  153. <executions>
  154. <execution>
  155. <id>install node and npm</id>
  156. <phase>generate-sources</phase>
  157. <goals>
  158. <goal>install-node-and-npm</goal>
  159. </goals>
  160. </execution>
  161. <execution>
  162. <id>npm install</id>
  163. <phase>generate-sources</phase>
  164. <goals>
  165. <goal>npm</goal>
  166. </goals>
  167. <configuration>
  168. <arguments>install --python="${project.basedir}/../src/main/unix/ambari-python-wrap" --unsafe-perm</arguments>
  169. </configuration>
  170. </execution>
  171. </executions>
  172. </plugin>
  173. <plugin>
  174. <artifactId>exec-maven-plugin</artifactId>
  175. <groupId>org.codehaus.mojo</groupId>
  176. <version>1.3.2</version>
  177. <executions>
  178. <execution>
  179. <id>Files build</id>
  180. <phase>generate-sources</phase>
  181. <goals>
  182. <goal>exec</goal>
  183. </goals>
  184. <configuration>
  185. <workingDirectory>${basedir}/src/main/resources/ui</workingDirectory>
  186. <executable>node/node</executable>
  187. <arguments>
  188. <argument>node_modules/.bin/ember</argument>
  189. <argument>build</argument>
  190. <argument>--environment=production</argument>
  191. </arguments>
  192. </configuration>
  193. </execution>
  194. </executions>
  195. </plugin>
  196. <plugin>
  197. <artifactId>maven-dependency-plugin</artifactId>
  198. <executions>
  199. <execution>
  200. <phase>generate-resources</phase>
  201. <goals>
  202. <goal>copy-dependencies</goal>
  203. </goals>
  204. <configuration>
  205. <outputDirectory>${project.build.directory}/lib</outputDirectory>
  206. <includeScope>runtime</includeScope>
  207. </configuration>
  208. </execution>
  209. <execution>
  210. <id>copy-artifact</id>
  211. <phase>package</phase>
  212. <goals>
  213. <goal>copy</goal>
  214. </goals>
  215. <configuration>
  216. <artifactItems>
  217. <artifactItem>
  218. <groupId>${project.groupId}</groupId>
  219. <artifactId>${project.artifactId}</artifactId>
  220. <version>${project.version}</version>
  221. <type>${project.packaging}</type>
  222. </artifactItem>
  223. </artifactItems>
  224. <outputDirectory>${views.jars.dir.rel}</outputDirectory>
  225. </configuration>
  226. </execution>
  227. </executions>
  228. </plugin>
  229. <plugin>
  230. <groupId>org.vafer</groupId>
  231. <artifactId>jdeb</artifactId>
  232. <version>1.0.1</version>
  233. <executions>
  234. <execution>
  235. <phase>none</phase>
  236. <goals>
  237. <goal>jdeb</goal>
  238. </goals>
  239. </execution>
  240. </executions>
  241. <configuration>
  242. <skip>true</skip>
  243. <submodules>false</submodules>
  244. </configuration>
  245. </plugin>
  246. </plugins>
  247. <resources>
  248. <resource>
  249. <directory>src/main/resources/ui/dist</directory>
  250. <filtering>false</filtering>
  251. </resource>
  252. <resource>
  253. <directory>src/main/resources/</directory>
  254. <filtering>false</filtering>
  255. <includes>
  256. <include>view.xml</include>
  257. <include>view.log4j.properties</include>
  258. </includes>
  259. </resource>
  260. <resource>
  261. <targetPath>WEB-INF/lib</targetPath>
  262. <filtering>false</filtering>
  263. <directory>target/lib</directory>
  264. </resource>
  265. </resources>
  266. <pluginManagement>
  267. <plugins>
  268. <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
  269. <plugin>
  270. <groupId>org.eclipse.m2e</groupId>
  271. <artifactId>lifecycle-mapping</artifactId>
  272. <version>1.0.0</version>
  273. <configuration>
  274. <lifecycleMappingMetadata>
  275. <pluginExecutions>
  276. <pluginExecution>
  277. <pluginExecutionFilter>
  278. <groupId>
  279. org.codehaus.mojo
  280. </groupId>
  281. <artifactId>
  282. exec-maven-plugin
  283. </artifactId>
  284. <versionRange>
  285. [1.2.1,)
  286. </versionRange>
  287. <goals>
  288. <goal>exec</goal>
  289. </goals>
  290. </pluginExecutionFilter>
  291. <action>
  292. <ignore></ignore>
  293. </action>
  294. </pluginExecution>
  295. <pluginExecution>
  296. <pluginExecutionFilter>
  297. <groupId>
  298. com.github.eirslett
  299. </groupId>
  300. <artifactId>
  301. frontend-maven-plugin
  302. </artifactId>
  303. <versionRange>
  304. [0.0.14,)
  305. </versionRange>
  306. <goals>
  307. <goal>
  308. install-node-and-npm
  309. </goal>
  310. <goal>npm</goal>
  311. </goals>
  312. </pluginExecutionFilter>
  313. <action>
  314. <ignore></ignore>
  315. </action>
  316. </pluginExecution>
  317. </pluginExecutions>
  318. </lifecycleMappingMetadata>
  319. </configuration>
  320. </plugin>
  321. </plugins>
  322. </pluginManagement>
  323. </build>
  324. <profiles>
  325. <profile>
  326. <id>windows</id>
  327. <activation>
  328. <os>
  329. <family>win</family>
  330. </os>
  331. </activation>
  332. <properties>
  333. <node.executable>node.exe</node.executable>
  334. <skip.nodegyp.chmod>true</skip.nodegyp.chmod>
  335. </properties>
  336. </profile>
  337. <profile>
  338. <id>linux</id>
  339. <activation>
  340. <os>
  341. <family>unix</family>
  342. </os>
  343. </activation>
  344. <properties>
  345. <node.executable>node</node.executable>
  346. <skip.nodegyp.chmod>false</skip.nodegyp.chmod>
  347. </properties>
  348. </profile>
  349. </profiles>
  350. </project>