pom.xml 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  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>0.0.16</version>
  88. <configuration>
  89. <nodeVersion>v4.5.0</nodeVersion>
  90. <npmVersion>2.15.0</npmVersion>
  91. <workingDirectory>src/main/resources/ui</workingDirectory>
  92. </configuration>
  93. <executions>
  94. <execution>
  95. <id>install node and npm</id>
  96. <phase>generate-sources</phase>
  97. <goals>
  98. <goal>install-node-and-npm</goal>
  99. </goals>
  100. </execution>
  101. <execution>
  102. <id>npm install</id>
  103. <phase>generate-sources</phase>
  104. <goals>
  105. <goal>npm</goal>
  106. </goals>
  107. <configuration>
  108. <arguments>install --unsafe-perm</arguments>
  109. </configuration>
  110. </execution>
  111. </executions>
  112. </plugin>
  113. <plugin>
  114. <artifactId>exec-maven-plugin</artifactId>
  115. <groupId>org.codehaus.mojo</groupId>
  116. <executions>
  117. <execution>
  118. <id>Bower install</id>
  119. <phase>generate-sources</phase>
  120. <goals>
  121. <goal>exec</goal>
  122. </goals>
  123. <configuration>
  124. <workingDirectory>${basedir}/src/main/resources/ui</workingDirectory>
  125. <executable>${basedir}/src/main/resources/ui/node/${executable.node}</executable>
  126. <arguments>
  127. <argument>node_modules/bower/bin/bower</argument>
  128. <argument>install</argument>
  129. <argument>--allow-root</argument>
  130. </arguments>
  131. </configuration>
  132. </execution>
  133. <execution>
  134. <id>grunt build</id>
  135. <phase>generate-sources</phase>
  136. <goals>
  137. <goal>exec</goal>
  138. </goals>
  139. <configuration>
  140. <workingDirectory>${basedir}/src/main/resources/ui</workingDirectory>
  141. <executable>${basedir}/src/main/resources/ui/node/${executable.node}</executable>
  142. <arguments>
  143. <argument>node_modules/grunt-cli/bin/grunt</argument>
  144. <argument>build</argument>
  145. </arguments>
  146. </configuration>
  147. </execution>
  148. </executions>
  149. </plugin>
  150. <plugin>
  151. <artifactId>maven-compiler-plugin</artifactId>
  152. <version>3.0</version>
  153. </plugin>
  154. <plugin>
  155. <groupId>org.vafer</groupId>
  156. <artifactId>jdeb</artifactId>
  157. <version>1.0.1</version>
  158. <executions>
  159. <execution>
  160. <phase>none</phase>
  161. <goals>
  162. <goal>jdeb</goal>
  163. </goals>
  164. </execution>
  165. </executions>
  166. <configuration>
  167. <skip>true</skip>
  168. <submodules>false</submodules>
  169. </configuration>
  170. </plugin>
  171. </plugins>
  172. <resources>
  173. <resource>
  174. <directory>src/main/resources</directory>
  175. <filtering>false</filtering>
  176. <includes>
  177. <include>WEB-INF/web.xml</include>
  178. <include>META-INF/**/*</include>
  179. <include>view.xml</include>
  180. <include>view.log4j.properties</include>
  181. </includes>
  182. </resource>
  183. <resource>
  184. <directory>src/main/resources/ui/dist</directory>
  185. <filtering>false</filtering>
  186. </resource>
  187. </resources>
  188. </build>
  189. <dependencies>
  190. <dependency>
  191. <groupId>org.apache.ambari</groupId>
  192. <artifactId>ambari-views</artifactId>
  193. <version>${ambari.version}</version>
  194. </dependency>
  195. <dependency>
  196. <groupId>javax.servlet</groupId>
  197. <artifactId>servlet-api</artifactId>
  198. <version>2.5</version>
  199. <scope>provided</scope>
  200. </dependency>
  201. <dependency>
  202. <groupId>com.google.inject</groupId>
  203. <artifactId>guice</artifactId>
  204. </dependency>
  205. </dependencies>
  206. <profiles>
  207. <profile>
  208. <id>windows</id>
  209. <activation>
  210. <os>
  211. <family>win</family>
  212. </os>
  213. </activation>
  214. <properties>
  215. <envClassifier>win</envClassifier>
  216. <executable.node>node.exe</executable.node>
  217. </properties>
  218. </profile>
  219. <profile>
  220. <id>linux</id>
  221. <activation>
  222. <os>
  223. <family>unix</family>
  224. </os>
  225. </activation>
  226. <properties>
  227. <envClassifier>linux</envClassifier>
  228. <executable.node>node</executable.node>
  229. </properties>
  230. </profile>
  231. </profiles>
  232. </project>