pom.xml 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  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/maven-v4_0_0.xsd">
  17. <parent>
  18. <groupId>org.apache.ambari.contrib.views</groupId>
  19. <artifactId>ambari-contrib-views</artifactId>
  20. <version>2.5.0.0.0</version>
  21. </parent>
  22. <modelVersion>4.0.0</modelVersion>
  23. <groupId>org.apache.ambari.contrib.views</groupId>
  24. <artifactId>jobs</artifactId>
  25. <packaging>jar</packaging>
  26. <name>Jobs</name>
  27. <version>2.5.0.0.0</version>
  28. <description>Jobs View</description>
  29. <properties>
  30. <ambari.dir>${project.parent.parent.parent.basedir}</ambari.dir>
  31. </properties>
  32. <build>
  33. <plugins>
  34. <plugin>
  35. <artifactId>maven-dependency-plugin</artifactId>
  36. <executions>
  37. <execution>
  38. <id>copy-artifact</id>
  39. <phase>package</phase>
  40. <goals>
  41. <goal>copy</goal>
  42. </goals>
  43. <configuration>
  44. <artifactItems>
  45. <artifactItem>
  46. <groupId>${project.groupId}</groupId>
  47. <artifactId>${project.artifactId}</artifactId>
  48. <version>${project.version}</version>
  49. <type>${project.packaging}</type>
  50. </artifactItem>
  51. </artifactItems>
  52. <outputDirectory>${views.jars.dir.rel}</outputDirectory>
  53. </configuration>
  54. </execution>
  55. </executions>
  56. </plugin>
  57. <plugin>
  58. <groupId>org.codehaus.mojo</groupId>
  59. <artifactId>build-helper-maven-plugin</artifactId>
  60. <version>1.8</version>
  61. <executions>
  62. <execution>
  63. <id>parse-version</id>
  64. <phase>validate</phase>
  65. <goals>
  66. <goal>parse-version</goal>
  67. </goals>
  68. </execution>
  69. <execution>
  70. <id>regex-property</id>
  71. <goals>
  72. <goal>regex-property</goal>
  73. </goals>
  74. <configuration>
  75. <name>ambariVersion</name>
  76. <value>${project.version}</value>
  77. <regex>^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-).*</regex>
  78. <replacement>$1.$2.$3.$4</replacement>
  79. <failIfNoMatch>false</failIfNoMatch>
  80. </configuration>
  81. </execution>
  82. </executions>
  83. </plugin>
  84. <plugin>
  85. <groupId>com.github.eirslett</groupId>
  86. <artifactId>frontend-maven-plugin</artifactId>
  87. <version>1.4</version>
  88. <configuration>
  89. <nodeVersion>v4.5.0</nodeVersion>
  90. <yarnVersion>v0.23.2</yarnVersion>
  91. <workingDirectory>src/main/resources/ui</workingDirectory>
  92. <npmInheritsProxyConfigFromMaven>false</npmInheritsProxyConfigFromMaven>
  93. <!-- setting npm_config_tmp environment variable is a workaround for
  94. https://github.com/Medium/phantomjs/issues/673 -->
  95. <environmentVariables>
  96. <npm_config_tmp>/tmp/npm_config_tmp</npm_config_tmp>
  97. </environmentVariables>
  98. </configuration>
  99. <executions>
  100. <execution>
  101. <id>install node and yarn</id>
  102. <phase>generate-sources</phase>
  103. <goals>
  104. <goal>install-node-and-yarn</goal>
  105. </goals>
  106. </execution>
  107. <execution>
  108. <id>yarn install --pure-lockfile</id>
  109. <phase>generate-sources</phase>
  110. <goals>
  111. <goal>yarn</goal>
  112. </goals>
  113. <configuration>
  114. <arguments>install --unsafe-perm</arguments>
  115. <arguments>--ignore-engines</arguments>
  116. </configuration>
  117. </execution>
  118. </executions>
  119. </plugin>
  120. <plugin>
  121. <artifactId>exec-maven-plugin</artifactId>
  122. <groupId>org.codehaus.mojo</groupId>
  123. <executions>
  124. <execution>
  125. <id>Bower install</id>
  126. <phase>generate-sources</phase>
  127. <goals>
  128. <goal>exec</goal>
  129. </goals>
  130. <configuration>
  131. <workingDirectory>${basedir}/src/main/resources/ui</workingDirectory>
  132. <executable>${basedir}/src/main/resources/ui/node/${executable.node}</executable>
  133. <arguments>
  134. <argument>node_modules/bower/bin/bower</argument>
  135. <argument>install</argument>
  136. <argument>--allow-root</argument>
  137. </arguments>
  138. </configuration>
  139. </execution>
  140. <execution>
  141. <id>grunt build</id>
  142. <phase>generate-sources</phase>
  143. <goals>
  144. <goal>exec</goal>
  145. </goals>
  146. <configuration>
  147. <workingDirectory>${basedir}/src/main/resources/ui</workingDirectory>
  148. <executable>${basedir}/src/main/resources/ui/node/${executable.node}</executable>
  149. <arguments>
  150. <argument>node_modules/grunt-cli/bin/grunt</argument>
  151. <argument>build</argument>
  152. </arguments>
  153. </configuration>
  154. </execution>
  155. </executions>
  156. </plugin>
  157. <plugin>
  158. <artifactId>maven-compiler-plugin</artifactId>
  159. <version>3.0</version>
  160. </plugin>
  161. <plugin>
  162. <groupId>org.vafer</groupId>
  163. <artifactId>jdeb</artifactId>
  164. <version>1.0.1</version>
  165. <executions>
  166. <execution>
  167. <phase>none</phase>
  168. <goals>
  169. <goal>jdeb</goal>
  170. </goals>
  171. </execution>
  172. </executions>
  173. <configuration>
  174. <skip>true</skip>
  175. <submodules>false</submodules>
  176. </configuration>
  177. </plugin>
  178. </plugins>
  179. <resources>
  180. <resource>
  181. <directory>src/main/resources</directory>
  182. <filtering>false</filtering>
  183. <includes>
  184. <include>WEB-INF/web.xml</include>
  185. <include>META-INF/**/*</include>
  186. <include>view.xml</include>
  187. <include>view.log4j.properties</include>
  188. </includes>
  189. </resource>
  190. <resource>
  191. <directory>src/main/resources/ui/dist</directory>
  192. <filtering>false</filtering>
  193. </resource>
  194. </resources>
  195. </build>
  196. <dependencies>
  197. <dependency>
  198. <groupId>org.apache.ambari</groupId>
  199. <artifactId>ambari-views</artifactId>
  200. <version>${ambari.version}</version>
  201. </dependency>
  202. <dependency>
  203. <groupId>javax.servlet</groupId>
  204. <artifactId>servlet-api</artifactId>
  205. <version>2.5</version>
  206. <scope>provided</scope>
  207. </dependency>
  208. <dependency>
  209. <groupId>com.google.inject</groupId>
  210. <artifactId>guice</artifactId>
  211. </dependency>
  212. </dependencies>
  213. <profiles>
  214. <profile>
  215. <id>windows</id>
  216. <activation>
  217. <os>
  218. <family>win</family>
  219. </os>
  220. </activation>
  221. <properties>
  222. <envClassifier>win</envClassifier>
  223. <executable.node>node.exe</executable.node>
  224. </properties>
  225. </profile>
  226. <profile>
  227. <id>linux</id>
  228. <activation>
  229. <os>
  230. <family>unix</family>
  231. </os>
  232. </activation>
  233. <properties>
  234. <envClassifier>linux</envClassifier>
  235. <executable.node>node</executable.node>
  236. </properties>
  237. </profile>
  238. </profiles>
  239. </project>