pom.xml 11 KB

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