pom.xml 11 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>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.5.0.0.0</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>commons-io</groupId>
  131. <artifactId>commons-io</artifactId>
  132. <version>2.4</version>
  133. </dependency>
  134. <dependency>
  135. <groupId>org.apache.ambari.contrib.views</groupId>
  136. <artifactId>ambari-views-utils</artifactId>
  137. <version>2.5.0.0.0</version>
  138. </dependency>
  139. <dependency>
  140. <groupId>org.apache.ambari.contrib.views</groupId>
  141. <artifactId>ambari-views-commons</artifactId>
  142. <version>2.5.0.0.0</version>
  143. </dependency>
  144. </dependencies>
  145. <properties>
  146. <ambari.dir>${project.parent.parent.parent.basedir}</ambari.dir>
  147. <ambari.version>2.5.0.0.0</ambari.version>
  148. <ui.directory>${basedir}/src/main/resources/ui/pig-web</ui.directory>
  149. </properties>
  150. <build>
  151. <plugins>
  152. <plugin>
  153. <!-- Cleanup ui files -->
  154. <groupId>org.apache.maven.plugins</groupId>
  155. <artifactId>maven-clean-plugin</artifactId>
  156. <version>2.5</version>
  157. <configuration>
  158. <filesets>
  159. <fileset>
  160. <directory>${ui.directory}</directory>
  161. <followSymlinks>false</followSymlinks>
  162. <includes>
  163. <include>public/**</include>
  164. <include>node_modules/**</include>
  165. <include>bower_components/**</include>
  166. <include>node/**</include>
  167. </includes>
  168. </fileset>
  169. </filesets>
  170. </configuration>
  171. </plugin>
  172. <!-- Building frontend -->
  173. <plugin>
  174. <groupId>com.github.eirslett</groupId>
  175. <artifactId>frontend-maven-plugin</artifactId>
  176. <version>0.0.16</version>
  177. <configuration>
  178. <nodeVersion>v0.10.26</nodeVersion>
  179. <npmVersion>1.4.3</npmVersion>
  180. <workingDirectory>${ui.directory}</workingDirectory>
  181. </configuration>
  182. <executions>
  183. <execution>
  184. <id>install node and npm</id>
  185. <phase>initialize</phase>
  186. <goals>
  187. <goal>install-node-and-npm</goal>
  188. </goals>
  189. </execution>
  190. <execution>
  191. <id>npm install</id>
  192. <goals>
  193. <goal>npm</goal>
  194. </goals>
  195. <phase>generate-resources</phase>
  196. <configuration>
  197. <!-- optional: The default argument is actually "install", so unless
  198. you need to run some other npm command, you can remove this whole <configuration>
  199. section. -->
  200. <arguments>install --unsafe-perm</arguments>
  201. </configuration>
  202. </execution>
  203. </executions>
  204. </plugin>
  205. <plugin>
  206. <artifactId>exec-maven-plugin</artifactId>
  207. <groupId>org.codehaus.mojo</groupId>
  208. <version>1.2.1</version>
  209. <executions>
  210. <execution>
  211. <id>node gyp executable</id>
  212. <phase>initialize</phase>
  213. <goals>
  214. <goal>exec</goal>
  215. </goals>
  216. <configuration>
  217. <skip>${skip.nodegyp.chmod}</skip>
  218. <workingDirectory>${ui.directory}</workingDirectory>
  219. <executable>chmod</executable>
  220. <arguments>
  221. <argument>+x</argument>
  222. <argument>${ui.directory}/node/npm/bin/node-gyp-bin/node-gyp</argument>
  223. </arguments>
  224. </configuration>
  225. </execution>
  226. <execution>
  227. <id>Bower install</id>
  228. <phase>generate-resources</phase>
  229. <goals>
  230. <goal>exec</goal>
  231. </goals>
  232. <configuration>
  233. <workingDirectory>${ui.directory}</workingDirectory>
  234. <executable>${ui.directory}/node/${node.executable}</executable>
  235. <arguments>
  236. <argument>${ui.directory}/node_modules/bower/bin/bower</argument>
  237. <argument>install</argument>
  238. <argument>--allow-root</argument>
  239. </arguments>
  240. </configuration>
  241. </execution>
  242. <execution>
  243. <id>Brunch build</id>
  244. <phase>generate-resources</phase>
  245. <goals>
  246. <goal>exec</goal>
  247. </goals>
  248. <configuration>
  249. <workingDirectory>${ui.directory}</workingDirectory>
  250. <executable>${ui.directory}/node/${node.executable}</executable>
  251. <arguments>
  252. <argument>node_modules/brunch/bin/brunch</argument>
  253. <argument>build</argument>
  254. </arguments>
  255. </configuration>
  256. </execution>
  257. </executions>
  258. </plugin>
  259. <plugin>
  260. <groupId>org.apache.maven.plugins</groupId>
  261. <artifactId>maven-compiler-plugin</artifactId>
  262. <version>3.1</version>
  263. <configuration>
  264. <source>1.6</source>
  265. <target>1.6</target>
  266. </configuration>
  267. </plugin>
  268. <plugin>
  269. <artifactId>maven-dependency-plugin</artifactId>
  270. <executions>
  271. <execution>
  272. <phase>generate-resources</phase>
  273. <goals>
  274. <goal>copy-dependencies</goal>
  275. </goals>
  276. <configuration>
  277. <outputDirectory>${project.build.directory}/lib</outputDirectory>
  278. <includeScope>runtime</includeScope>
  279. </configuration>
  280. </execution>
  281. </executions>
  282. </plugin>
  283. <plugin>
  284. <groupId>org.vafer</groupId>
  285. <artifactId>jdeb</artifactId>
  286. <version>1.0.1</version>
  287. <executions>
  288. <execution>
  289. <phase>none</phase>
  290. <goals>
  291. <goal>jdeb</goal>
  292. </goals>
  293. </execution>
  294. </executions>
  295. <configuration>
  296. <skip>true</skip>
  297. <submodules>false</submodules>
  298. </configuration>
  299. </plugin>
  300. </plugins>
  301. <resources>
  302. <resource>
  303. <directory>src/main/resources</directory>
  304. <filtering>false</filtering>
  305. <includes>
  306. <include>META-INF/**/*</include>
  307. <include>view.xml</include>
  308. <include>view.log4j.properties</include>
  309. </includes>
  310. </resource>
  311. <resource>
  312. <directory>src/main/resources/ui/pig-web/public</directory>
  313. <filtering>false</filtering>
  314. </resource>
  315. <resource>
  316. <targetPath>WEB-INF/lib</targetPath>
  317. <filtering>false</filtering>
  318. <directory>target/lib</directory>
  319. </resource>
  320. </resources>
  321. </build>
  322. <profiles>
  323. <profile>
  324. <id>windows</id>
  325. <activation>
  326. <os>
  327. <family>win</family>
  328. </os>
  329. </activation>
  330. <properties>
  331. <node.executable>node.exe</node.executable>
  332. <skip.nodegyp.chmod>true</skip.nodegyp.chmod>
  333. </properties>
  334. </profile>
  335. <profile>
  336. <id>linux</id>
  337. <activation>
  338. <os>
  339. <family>unix</family>
  340. </os>
  341. </activation>
  342. <properties>
  343. <node.executable>node</node.executable>
  344. <skip.nodegyp.chmod>false</skip.nodegyp.chmod>
  345. </properties>
  346. </profile>
  347. </profiles>
  348. </project>