pom.xml 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
  2. license agreements. See the NOTICE file distributed with this work for additional
  3. information regarding copyright ownership. The ASF licenses this file to
  4. You under the Apache License, Version 2.0 (the "License"); you may not use
  5. this file except in compliance with the License. You may obtain a copy of
  6. the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
  7. by applicable law or agreed to in writing, software distributed under the
  8. License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
  9. OF ANY KIND, either express or implied. See the License for the specific
  10. language governing permissions and limitations under the License. -->
  11. <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  12. xmlns="http://maven.apache.org/POM/4.0.0"
  13. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  14. <modelVersion>4.0.0</modelVersion>
  15. <artifactId>wfmanager</artifactId>
  16. <groupId>org.apache.ambari.contrib.views</groupId>
  17. <version>0.1.0.0-SNAPSHOT</version>
  18. <name>WF Manager View</name>
  19. <parent>
  20. <groupId>org.apache.ambari.contrib.views</groupId>
  21. <artifactId>ambari-contrib-views</artifactId>
  22. <version>2.5.0.0.0</version>
  23. </parent>
  24. <dependencies>
  25. <dependency>
  26. <groupId>org.apache.ambari.contrib.views</groupId>
  27. <artifactId>ambari-views-utils</artifactId>
  28. <version>2.5.0.0.0</version>
  29. </dependency>
  30. <dependency>
  31. <groupId>org.apache.ambari</groupId>
  32. <artifactId>ambari-views</artifactId>
  33. <scope>provided</scope>
  34. </dependency>
  35. <dependency>
  36. <groupId>org.apache.ambari.contrib.views</groupId>
  37. <artifactId>ambari-views-commons</artifactId>
  38. <version>2.5.0.0.0</version>
  39. </dependency>
  40. <dependency>
  41. <groupId>com.sun.jersey</groupId>
  42. <artifactId>jersey-core</artifactId>
  43. </dependency>
  44. <!-- <dependency> <groupId>javax.xml.bind</groupId> <artifactId>jaxb-api</artifactId>
  45. <version>2.2.2</version> </dependency> <dependency> <groupId>com.sun.xml.bind</groupId>
  46. <artifactId>jaxb-impl</artifactId> <version>2.1.2</version> </dependency> -->
  47. <dependency>
  48. <groupId>com.sun.jersey</groupId>
  49. <artifactId>jersey-client</artifactId>
  50. </dependency>
  51. <dependency>
  52. <groupId>com.sun.jersey</groupId>
  53. <artifactId>jersey-json</artifactId>
  54. </dependency>
  55. <dependency>
  56. <groupId>javax.servlet</groupId>
  57. <artifactId>javax.servlet-api</artifactId>
  58. </dependency>
  59. <dependency>
  60. <groupId>junit</groupId>
  61. <artifactId>junit</artifactId>
  62. <scope>test</scope>
  63. </dependency>
  64. <dependency>
  65. <groupId>com.google.code.gson</groupId>
  66. <artifactId>gson</artifactId>
  67. </dependency>
  68. <dependency>
  69. <groupId>commons-io</groupId>
  70. <artifactId>commons-io</artifactId>
  71. <version>2.4</version>
  72. </dependency>
  73. <dependency>
  74. <groupId>org.slf4j</groupId>
  75. <artifactId>slf4j-api</artifactId>
  76. </dependency>
  77. <dependency>
  78. <groupId>javax.inject</groupId>
  79. <artifactId>javax.inject</artifactId>
  80. <version>1</version>
  81. </dependency>
  82. <dependency>
  83. <groupId>org.apache.hadoop</groupId>
  84. <artifactId>hadoop-common</artifactId>
  85. <version>${hadoop.version}</version>
  86. <exclusions>
  87. <exclusion>
  88. <groupId>tomcat</groupId>
  89. <artifactId>jasper-runtime</artifactId>
  90. </exclusion>
  91. </exclusions>
  92. </dependency>
  93. <dependency>
  94. <groupId>org.apache.hadoop</groupId>
  95. <artifactId>hadoop-hdfs</artifactId>
  96. <version>${hadoop.version}</version>
  97. <exclusions>
  98. <exclusion>
  99. <groupId>tomcat</groupId>
  100. <artifactId>jasper-runtime</artifactId>
  101. </exclusion>
  102. </exclusions>
  103. </dependency>
  104. </dependencies>
  105. <properties>
  106. <uicode.dir>../</uicode.dir>
  107. <checkstyle.skip>true</checkstyle.skip>
  108. <ambari.dir>${project.parent.parent.parent.basedir}</ambari.dir>
  109. <ui.directory>${basedir}/src/main/resources/ui</ui.directory>
  110. </properties>
  111. <build>
  112. <plugins>
  113. <plugin>
  114. <groupId>org.apache.maven.plugins</groupId>
  115. <artifactId>maven-clean-plugin</artifactId>
  116. <version>2.5</version>
  117. <configuration>
  118. <filesets>
  119. <fileset>
  120. <directory>${ui.directory}</directory>
  121. <followSymlinks>false</followSymlinks>
  122. <includes>
  123. <include>tmp/**</include>
  124. <!--
  125. <include>node_modules/**</include>
  126. <include>bower_components/**</include>
  127. -->
  128. <include>node/**</include>
  129. </includes>
  130. </fileset>
  131. </filesets>
  132. </configuration>
  133. </plugin>
  134. <plugin>
  135. <groupId>com.github.eirslett</groupId>
  136. <artifactId>frontend-maven-plugin</artifactId>
  137. <version>1.4</version>
  138. <configuration>
  139. <nodeVersion>v4.5.0</nodeVersion>
  140. <yarnVersion>v0.23.2</yarnVersion>
  141. <workingDirectory>src/main/resources/ui/</workingDirectory>
  142. <npmInheritsProxyConfigFromMaven>false</npmInheritsProxyConfigFromMaven>
  143. <!-- setting npm_config_tmp environment variable is a workaround for
  144. https://github.com/Medium/phantomjs/issues/673 -->
  145. <environmentVariables>
  146. <npm_config_tmp>/tmp/npm_config_tmp</npm_config_tmp>
  147. </environmentVariables>
  148. </configuration>
  149. <executions>
  150. <execution>
  151. <id>install node and yarn</id>
  152. <phase>generate-sources</phase>
  153. <goals>
  154. <goal>install-node-and-yarn</goal>
  155. </goals>
  156. </execution>
  157. <execution>
  158. <id>yarn install</id>
  159. <phase>generate-sources</phase>
  160. <goals>
  161. <goal>yarn</goal>
  162. </goals>
  163. <configuration>
  164. <arguments>install
  165. --python="${project.basedir}/../src/main/unix/ambari-python-wrap"
  166. --unsafe-perm</arguments>
  167. <arguments>--ignore-engines</arguments>
  168. </configuration>
  169. </execution>
  170. </executions>
  171. </plugin>
  172. <plugin>
  173. <artifactId>exec-maven-plugin</artifactId>
  174. <groupId>org.codehaus.mojo</groupId>
  175. <version>1.3.2</version>
  176. <executions>
  177. <execution>
  178. <id>Bower install</id>
  179. <phase>generate-sources</phase>
  180. <goals>
  181. <goal>exec</goal>
  182. </goals>
  183. <configuration>
  184. <workingDirectory>${ui.directory}</workingDirectory>
  185. <executable>${ui.directory}/node/${node.executable}</executable>
  186. <arguments>
  187. <argument>${ui.directory}/node_modules/bower/bin/bower</argument>
  188. <argument>install</argument>
  189. <argument>--allow-root</argument>
  190. </arguments>
  191. </configuration>
  192. </execution>
  193. <execution>
  194. <id>Files build</id>
  195. <phase>generate-sources</phase>
  196. <goals>
  197. <goal>exec</goal>
  198. </goals>
  199. <configuration>
  200. <workingDirectory>${ui.directory}</workingDirectory>
  201. <executable>${ui.directory}/node/${node.executable}</executable>
  202. <arguments>
  203. <argument>${ui.directory}/node_modules/.bin/${ember.executable}</argument>
  204. <argument>build</argument>
  205. <argument>-prod</argument>
  206. </arguments>
  207. </configuration>
  208. </execution>
  209. </executions>
  210. </plugin>
  211. <plugin>
  212. <groupId>org.apache.maven.plugins</groupId>
  213. <artifactId>maven-compiler-plugin</artifactId>
  214. <version>3.1</version>
  215. <configuration>
  216. <source>1.7</source>
  217. <target>1.7</target>
  218. </configuration>
  219. </plugin>
  220. <plugin>
  221. <artifactId>maven-dependency-plugin</artifactId>
  222. <executions>
  223. <execution>
  224. <phase>generate-resources</phase>
  225. <goals>
  226. <goal>copy-dependencies</goal>
  227. </goals>
  228. <configuration>
  229. <outputDirectory>${project.build.directory}/lib</outputDirectory>
  230. <includeScope>runtime</includeScope>
  231. </configuration>
  232. </execution>
  233. <execution>
  234. <id>copy-artifact</id>
  235. <phase>package</phase>
  236. <goals>
  237. <goal>copy</goal>
  238. </goals>
  239. <configuration>
  240. <artifactItems>
  241. <artifactItem>
  242. <groupId>${project.groupId}</groupId>
  243. <artifactId>${project.artifactId}</artifactId>
  244. <version>${project.version}</version>
  245. <type>${project.packaging}</type>
  246. </artifactItem>
  247. </artifactItems>
  248. <outputDirectory>${views.jars.dir.rel}</outputDirectory>
  249. </configuration>
  250. </execution>
  251. </executions>
  252. </plugin>
  253. </plugins>
  254. <resources>
  255. <resource>
  256. <directory>src/main/resources</directory>
  257. <filtering>false</filtering>
  258. <includes>
  259. <include>META-INF/**/*</include>
  260. <include>view.xml</include>
  261. <include>view.log4j.properties</include>
  262. </includes>
  263. </resource>
  264. <resource>
  265. <directory>src/main/resources/ui/dist</directory>
  266. <filtering>false</filtering>
  267. </resource>
  268. <!-- <resource> <directory>src/main/resources/ui/</directory> <filtering>false</filtering>
  269. </resource> -->
  270. <resource>
  271. <directory>${uicode.dir}/dist</directory>
  272. <filtering>false</filtering>
  273. </resource>
  274. <resource>
  275. <targetPath>WEB-INF/lib</targetPath>
  276. <filtering>false</filtering>
  277. <directory>target/lib</directory>
  278. </resource>
  279. </resources>
  280. </build>
  281. <profiles>
  282. <profile>
  283. <id>windows</id>
  284. <activation>
  285. <os>
  286. <family>win</family>
  287. </os>
  288. </activation>
  289. <properties>
  290. <node.executable>node.exe</node.executable>
  291. <ember.executable>ember.cmd</ember.executable>
  292. <skip.nodegyp.chmod>true</skip.nodegyp.chmod>
  293. </properties>
  294. </profile>
  295. <profile>
  296. <id>linux</id>
  297. <activation>
  298. <os>
  299. <family>unix</family>
  300. </os>
  301. </activation>
  302. <properties>
  303. <node.executable>node</node.executable>
  304. <ember.executable>ember</ember.executable>
  305. <skip.nodegyp.chmod>false</skip.nodegyp.chmod>
  306. </properties>
  307. </profile>
  308. </profiles>
  309. </project>