pom.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  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</groupId>
  19. <artifactId>ambari-project</artifactId>
  20. <version>2.5.0.0.0</version>
  21. <relativePath>../ambari-project</relativePath>
  22. </parent>
  23. <modelVersion>4.0.0</modelVersion>
  24. <groupId>org.apache.ambari</groupId>
  25. <artifactId>ambari-admin</artifactId>
  26. <packaging>jar</packaging>
  27. <name>Ambari Admin View</name>
  28. <version>2.5.0.0.0</version>
  29. <description>Admin control panel</description>
  30. <build>
  31. <plugins>
  32. <plugin>
  33. <groupId>org.codehaus.mojo</groupId>
  34. <artifactId>build-helper-maven-plugin</artifactId>
  35. <version>1.8</version>
  36. <executions>
  37. <execution>
  38. <id>parse-version</id>
  39. <phase>validate</phase>
  40. <goals>
  41. <goal>parse-version</goal>
  42. </goals>
  43. </execution>
  44. <execution>
  45. <id>regex-property</id>
  46. <goals>
  47. <goal>regex-property</goal>
  48. </goals>
  49. <configuration>
  50. <name>ambariVersion</name>
  51. <value>${project.version}</value>
  52. <regex>^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-).*</regex>
  53. <replacement>$1.$2.$3.$4</replacement>
  54. <failIfNoMatch>false</failIfNoMatch>
  55. </configuration>
  56. </execution>
  57. </executions>
  58. </plugin>
  59. <plugin>
  60. <groupId>com.github.eirslett</groupId>
  61. <artifactId>frontend-maven-plugin</artifactId>
  62. <version>1.3</version>
  63. <configuration>
  64. <nodeVersion>v4.5.0</nodeVersion>
  65. <npmVersion>2.15.0</npmVersion>
  66. <workingDirectory>src/main/resources/ui/admin-web/</workingDirectory>
  67. <npmInheritsProxyConfigFromMaven>false</npmInheritsProxyConfigFromMaven>
  68. </configuration>
  69. <executions>
  70. <execution>
  71. <id>install node and npm</id>
  72. <phase>generate-sources</phase>
  73. <goals>
  74. <goal>install-node-and-npm</goal>
  75. </goals>
  76. </execution>
  77. <execution>
  78. <id>npm install</id>
  79. <phase>generate-sources</phase>
  80. <goals>
  81. <goal>npm</goal>
  82. </goals>
  83. <configuration>
  84. <arguments>install --unsafe-perm</arguments>
  85. </configuration>
  86. </execution>
  87. </executions>
  88. </plugin>
  89. <plugin>
  90. <artifactId>exec-maven-plugin</artifactId>
  91. <groupId>org.codehaus.mojo</groupId>
  92. <executions>
  93. <execution>
  94. <id>Bower install</id>
  95. <phase>generate-sources</phase>
  96. <goals>
  97. <goal>exec</goal>
  98. </goals>
  99. <configuration>
  100. <workingDirectory>${basedir}/src/main/resources/ui/admin-web</workingDirectory>
  101. <executable>${basedir}/src/main/resources/ui/admin-web/node/${executable.node}</executable>
  102. <arguments>
  103. <argument>${basedir}/src/main/resources/ui/admin-web/node_modules/bower/bin/bower</argument>
  104. <argument>install</argument>
  105. <argument>--allow-root</argument>
  106. </arguments>
  107. </configuration>
  108. </execution>
  109. <execution>
  110. <id>Gulp build</id>
  111. <phase>generate-sources</phase>
  112. <goals>
  113. <goal>exec</goal>
  114. </goals>
  115. <configuration>
  116. <workingDirectory>${basedir}/src/main/resources/ui/admin-web</workingDirectory>
  117. <executable>${basedir}/src/main/resources/ui/admin-web/node/${executable.node}</executable>
  118. <arguments>
  119. <argument>${basedir}/src/main/resources/ui/admin-web/node_modules/gulp/bin/gulp</argument>
  120. <argument>build</argument>
  121. </arguments>
  122. </configuration>
  123. </execution>
  124. <execution>
  125. <id>set-ambari-version</id>
  126. <phase>compile</phase>
  127. <goals>
  128. <goal>exec</goal>
  129. </goals>
  130. <configuration>
  131. <!-- sets Ambari version to make it accessible from code -->
  132. <executable>${executable.shell}</executable>
  133. <workingDirectory>${basedir}</workingDirectory>
  134. <commandlineArgs>${args.shell} ${basedir}${dirsep}set-ambari-version.${fileextension.shell} ${ambariVersion}</commandlineArgs>
  135. </configuration>
  136. </execution>
  137. <!-- @TODO: uncomment below execution for triggering ambar-admin UI unit tests from maven test phase.(AMBARI-7600)
  138. <execution>
  139. <id>unit test</id>
  140. <phase>test</phase>
  141. <goals>
  142. <goal>exec</goal>
  143. </goals>
  144. <configuration>
  145. <workingDirectory>${basedir}/src/main/resources/ui/admin-web</workingDirectory>
  146. <executable>npm</executable>
  147. <arguments>
  148. <argument>run</argument>
  149. <argument>test-single-run</argument>
  150. </arguments>
  151. </configuration>
  152. </execution>
  153. -->
  154. </executions>
  155. </plugin>
  156. <plugin>
  157. <artifactId>maven-compiler-plugin</artifactId>
  158. <version>3.0</version>
  159. </plugin>
  160. <plugin>
  161. <artifactId>maven-assembly-plugin</artifactId>
  162. <configuration>
  163. <descriptors>
  164. <descriptor>src/main/assemblies/empty.xml</descriptor>
  165. </descriptors>
  166. </configuration>
  167. </plugin>
  168. <plugin>
  169. <groupId>org.vafer</groupId>
  170. <artifactId>jdeb</artifactId>
  171. <version>1.0.1</version>
  172. <executions>
  173. <execution>
  174. <phase>none</phase>
  175. <goals>
  176. <goal>jdeb</goal>
  177. </goals>
  178. </execution>
  179. </executions>
  180. <configuration>
  181. <skip>true</skip>
  182. <submodules>false</submodules>
  183. </configuration>
  184. </plugin>
  185. <plugin>
  186. <groupId>org.apache.rat</groupId>
  187. <artifactId>apache-rat-plugin</artifactId>
  188. <configuration>
  189. <excludes>
  190. <exclude>src/main/resources/ui/admin-web/bower_components/**</exclude>
  191. <exclude>src/main/resources/ui/admin-web/dist/**</exclude>
  192. <exclude>src/main/resources/ui/admin-web/node/**</exclude>
  193. <exclude>src/main/resources/ui/admin-web/app/assets/data/**</exclude>
  194. <exclude>src/main/resources/ui/admin-web/node_modules/**</exclude>
  195. <exclude>src/main/resources/ui/admin-web/app/bower_components/**</exclude>
  196. <exclude>src/main/resources/ui/admin-web/test/bower_components/**</exclude>
  197. <exclude>src/main/resources/ui/admin-web/mock.js</exclude>
  198. <exclude>src/main/resources/ui/admin-web/bower.json</exclude>
  199. <exclude>src/main/resources/ui/admin-web/test/bower.json</exclude>
  200. <exclude>src/main/resources/ui/admin-web/test/.bowerrc</exclude>
  201. <exclude>src/main/resources/ui/admin-web/.bowerrc</exclude>
  202. <exclude>src/main/resources/ui/admin-web/package.json</exclude>
  203. <exclude>src/main/resources/ui/admin-web/.jshintrc</exclude>
  204. <exclude>src/main/resources/ui/admin-web/.idea/**</exclude>
  205. </excludes>
  206. </configuration>
  207. <executions>
  208. <execution>
  209. <phase>test</phase>
  210. <goals>
  211. <goal>check</goal>
  212. </goals>
  213. </execution>
  214. </executions>
  215. </plugin>
  216. </plugins>
  217. <resources>
  218. <resource>
  219. <directory>src/main/resources</directory>
  220. <filtering>false</filtering>
  221. <includes>
  222. <include>META-INF/**/*</include>
  223. </includes>
  224. </resource>
  225. <resource>
  226. <directory>src/main/resources/ui/admin-web/dist</directory>
  227. <filtering>false</filtering>
  228. </resource>
  229. </resources>
  230. </build>
  231. <profiles>
  232. <profile>
  233. <id>windows</id>
  234. <activation>
  235. <os>
  236. <family>win</family>
  237. </os>
  238. </activation>
  239. <properties>
  240. <envClassifier>win</envClassifier>
  241. <executable.node>node.exe</executable.node>
  242. <dirsep>\</dirsep>
  243. <executable.shell>cmd</executable.shell>
  244. <fileextension.shell>cmd</fileextension.shell>
  245. <args.shell>/C</args.shell>
  246. </properties>
  247. </profile>
  248. <profile>
  249. <id>linux</id>
  250. <activation>
  251. <os>
  252. <family>unix</family>
  253. </os>
  254. </activation>
  255. <properties>
  256. <envClassifier>linux</envClassifier>
  257. <executable.node>node</executable.node>
  258. <dirsep>/</dirsep>
  259. <executable.shell>sh</executable.shell>
  260. <fileextension.shell>sh</fileextension.shell>
  261. <args.shell></args.shell>
  262. </properties>
  263. </profile>
  264. <profile>
  265. <id>pluggable-stack-definition</id>
  266. <activation>
  267. <activeByDefault>false</activeByDefault>
  268. </activation>
  269. <build>
  270. <plugins>
  271. <plugin>
  272. <groupId>org.codehaus.mojo</groupId>
  273. <artifactId>exec-maven-plugin</artifactId>
  274. <version>1.2.1</version>
  275. <executions>
  276. <execution>
  277. <id>copy-pluggable-stack-resources</id>
  278. <phase>initialize</phase>
  279. <goals>
  280. <goal>exec</goal>
  281. </goals>
  282. <configuration>
  283. <!-- Copy stack specific UI resources -->
  284. <executable>${executable.shell}</executable>
  285. <workingDirectory>${basedir}</workingDirectory>
  286. <commandlineArgs>${args.shell} ${basedir}${dirsep}copy-pluggable-stack-resources.${fileextension.shell} ${stack.distribution}</commandlineArgs>
  287. </configuration>
  288. </execution>
  289. </executions>
  290. </plugin>
  291. </plugins>
  292. </build>
  293. </profile>
  294. </profiles>
  295. </project>