pom.xml 11 KB

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