pom.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372
  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>1.3</version>
  177. <configuration>
  178. <nodeVersion>v4.5.0</nodeVersion>
  179. <npmVersion>2.15.0</npmVersion>
  180. <workingDirectory>${ui.directory}</workingDirectory>
  181. <npmInheritsProxyConfigFromMaven>false</npmInheritsProxyConfigFromMaven>
  182. </configuration>
  183. <executions>
  184. <execution>
  185. <id>install node and npm</id>
  186. <phase>initialize</phase>
  187. <goals>
  188. <goal>install-node-and-npm</goal>
  189. </goals>
  190. </execution>
  191. <execution>
  192. <id>npm install</id>
  193. <goals>
  194. <goal>npm</goal>
  195. </goals>
  196. <phase>generate-resources</phase>
  197. <configuration>
  198. <!-- optional: The default argument is actually "install", so unless
  199. you need to run some other npm command, you can remove this whole <configuration>
  200. section. -->
  201. <arguments>install --unsafe-perm</arguments>
  202. </configuration>
  203. </execution>
  204. </executions>
  205. </plugin>
  206. <plugin>
  207. <artifactId>exec-maven-plugin</artifactId>
  208. <groupId>org.codehaus.mojo</groupId>
  209. <version>1.2.1</version>
  210. <executions>
  211. <execution>
  212. <id>node gyp executable</id>
  213. <phase>initialize</phase>
  214. <goals>
  215. <goal>exec</goal>
  216. </goals>
  217. <configuration>
  218. <skip>${skip.nodegyp.chmod}</skip>
  219. <workingDirectory>${ui.directory}</workingDirectory>
  220. <executable>chmod</executable>
  221. <arguments>
  222. <argument>+x</argument>
  223. <argument>${ui.directory}/node/node_modules/npm/bin/node-gyp-bin/node-gyp</argument>
  224. </arguments>
  225. </configuration>
  226. </execution>
  227. <execution>
  228. <id>Bower install</id>
  229. <phase>generate-resources</phase>
  230. <goals>
  231. <goal>exec</goal>
  232. </goals>
  233. <configuration>
  234. <workingDirectory>${ui.directory}</workingDirectory>
  235. <executable>${ui.directory}/node/${node.executable}</executable>
  236. <arguments>
  237. <argument>${ui.directory}/node_modules/bower/bin/bower</argument>
  238. <argument>install</argument>
  239. <argument>--allow-root</argument>
  240. </arguments>
  241. </configuration>
  242. </execution>
  243. <execution>
  244. <id>Brunch build</id>
  245. <phase>generate-resources</phase>
  246. <goals>
  247. <goal>exec</goal>
  248. </goals>
  249. <configuration>
  250. <workingDirectory>${ui.directory}</workingDirectory>
  251. <executable>${ui.directory}/node/${node.executable}</executable>
  252. <arguments>
  253. <argument>node_modules/brunch/bin/brunch</argument>
  254. <argument>build</argument>
  255. </arguments>
  256. </configuration>
  257. </execution>
  258. </executions>
  259. </plugin>
  260. <plugin>
  261. <groupId>org.apache.maven.plugins</groupId>
  262. <artifactId>maven-compiler-plugin</artifactId>
  263. <version>3.1</version>
  264. <configuration>
  265. <source>1.6</source>
  266. <target>1.6</target>
  267. </configuration>
  268. </plugin>
  269. <plugin>
  270. <artifactId>maven-dependency-plugin</artifactId>
  271. <executions>
  272. <execution>
  273. <phase>generate-resources</phase>
  274. <goals>
  275. <goal>copy-dependencies</goal>
  276. </goals>
  277. <configuration>
  278. <outputDirectory>${project.build.directory}/lib</outputDirectory>
  279. <includeScope>runtime</includeScope>
  280. </configuration>
  281. </execution>
  282. <execution>
  283. <id>copy-artifact</id>
  284. <phase>package</phase>
  285. <goals>
  286. <goal>copy</goal>
  287. </goals>
  288. <configuration>
  289. <artifactItems>
  290. <artifactItem>
  291. <groupId>${project.groupId}</groupId>
  292. <artifactId>${project.artifactId}</artifactId>
  293. <version>${project.version}</version>
  294. <type>${project.packaging}</type>
  295. </artifactItem>
  296. </artifactItems>
  297. <outputDirectory>${views.jars.dir.rel}</outputDirectory>
  298. </configuration>
  299. </execution>
  300. </executions>
  301. </plugin>
  302. <plugin>
  303. <groupId>org.vafer</groupId>
  304. <artifactId>jdeb</artifactId>
  305. <version>1.0.1</version>
  306. <executions>
  307. <execution>
  308. <phase>none</phase>
  309. <goals>
  310. <goal>jdeb</goal>
  311. </goals>
  312. </execution>
  313. </executions>
  314. <configuration>
  315. <skip>true</skip>
  316. <submodules>false</submodules>
  317. </configuration>
  318. </plugin>
  319. </plugins>
  320. <resources>
  321. <resource>
  322. <directory>src/main/resources</directory>
  323. <filtering>false</filtering>
  324. <includes>
  325. <include>META-INF/**/*</include>
  326. <include>view.xml</include>
  327. <include>view.log4j.properties</include>
  328. </includes>
  329. </resource>
  330. <resource>
  331. <directory>src/main/resources/ui/pig-web/public</directory>
  332. <filtering>false</filtering>
  333. </resource>
  334. <resource>
  335. <targetPath>WEB-INF/lib</targetPath>
  336. <filtering>false</filtering>
  337. <directory>target/lib</directory>
  338. </resource>
  339. </resources>
  340. </build>
  341. <profiles>
  342. <profile>
  343. <id>windows</id>
  344. <activation>
  345. <os>
  346. <family>win</family>
  347. </os>
  348. </activation>
  349. <properties>
  350. <node.executable>node.exe</node.executable>
  351. <skip.nodegyp.chmod>true</skip.nodegyp.chmod>
  352. </properties>
  353. </profile>
  354. <profile>
  355. <id>linux</id>
  356. <activation>
  357. <os>
  358. <family>unix</family>
  359. </os>
  360. </activation>
  361. <properties>
  362. <node.executable>node</node.executable>
  363. <skip.nodegyp.chmod>false</skip.nodegyp.chmod>
  364. </properties>
  365. </profile>
  366. </profiles>
  367. </project>