pom.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. <?xml version="1.0"?>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one or more
  4. contributor license agreements. See the NOTICE file distributed with
  5. this work for additional information regarding copyright ownership.
  6. The ASF licenses this file to You under the Apache License, Version 2.0
  7. (the "License"); you may not use this file except in compliance with
  8. the License. You may obtain a copy of the License at
  9. http://www.apache.org/licenses/LICENSE-2.0
  10. Unless required by applicable law or agreed to in writing, software
  11. distributed under the License is distributed on an "AS IS" BASIS,
  12. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. See the License for the specific language governing permissions and
  14. limitations under the License.
  15. -->
  16. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  17. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  18. <parent>
  19. <groupId>org.apache.ambari</groupId>
  20. <artifactId>ambari-project</artifactId>
  21. <version>2.0.0.0-SNAPSHOT</version>
  22. <relativePath>../ambari-project</relativePath>
  23. </parent>
  24. <modelVersion>4.0.0</modelVersion>
  25. <artifactId>ambari-web</artifactId>
  26. <packaging>pom</packaging>
  27. <name>Ambari Web</name>
  28. <version>2.0.0.0-SNAPSHOT</version>
  29. <description>Ambari Web</description>
  30. <properties>
  31. <ambari.dir>${project.parent.parent.basedir}</ambari.dir>
  32. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  33. <nodemodules.dir>node_modules</nodemodules.dir> <!-- specify -Dnodemodules.dir option to reduce ambari-web build time by not re-downloading npm modules -->
  34. </properties>
  35. <build>
  36. <plugins>
  37. <plugin>
  38. <groupId>org.codehaus.mojo</groupId>
  39. <artifactId>build-helper-maven-plugin</artifactId>
  40. <version>1.8</version>
  41. <executions>
  42. <execution>
  43. <id>parse-version</id>
  44. <phase>validate</phase>
  45. <goals>
  46. <goal>parse-version</goal>
  47. </goals>
  48. </execution>
  49. <execution>
  50. <id>regex-property</id>
  51. <goals>
  52. <goal>regex-property</goal>
  53. </goals>
  54. <configuration>
  55. <name>ambariVersion</name>
  56. <value>${project.version}</value>
  57. <regex>^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-).*</regex>
  58. <replacement>$1.$2.$3.$4</replacement>
  59. <failIfNoMatch>false</failIfNoMatch>
  60. </configuration>
  61. </execution>
  62. </executions>
  63. </plugin>
  64. <plugin>
  65. <artifactId>maven-compiler-plugin</artifactId>
  66. <version>3.0</version>
  67. </plugin>
  68. <plugin>
  69. <groupId>org.codehaus.mojo</groupId>
  70. <artifactId>rpm-maven-plugin</artifactId>
  71. <version>2.0.1</version>
  72. <executions>
  73. <execution>
  74. <!-- unbinds rpm creation from maven lifecycle -->
  75. <phase>none</phase>
  76. <goals>
  77. <goal>attached-rpm</goal>
  78. </goals>
  79. </execution>
  80. </executions>
  81. <configuration>
  82. <copyright>2012, Apache Software Foundation</copyright>
  83. <group>Development</group>
  84. <description>Maven Recipe: RPM Package.</description>
  85. <mappings/>
  86. </configuration>
  87. </plugin>
  88. <plugin>
  89. <groupId>org.codehaus.mojo</groupId>
  90. <artifactId>exec-maven-plugin</artifactId>
  91. <version>1.2.1</version>
  92. <executions>
  93. <execution>
  94. <id>clean-rmdir</id>
  95. <phase>clean</phase>
  96. <goals>
  97. <goal>exec</goal>
  98. </goals>
  99. <configuration>
  100. <executable>${executable.rmdir}</executable>
  101. <workingDirectory>${basedir}</workingDirectory>
  102. <commandlineArgs>${args.rm.clean} public ${nodemodules.dir}</commandlineArgs>
  103. <successCodes>
  104. <successCode>0</successCode>
  105. <successCode>1</successCode>
  106. <successCode>2</successCode>
  107. </successCodes>
  108. </configuration>
  109. </execution>
  110. <execution>
  111. <id>clean-mkdir</id>
  112. <phase>clean</phase>
  113. <goals>
  114. <goal>exec</goal>
  115. </goals>
  116. <configuration>
  117. <executable>${executable.mkdir}</executable>
  118. <workingDirectory>${basedir}</workingDirectory>
  119. <commandlineArgs>${args.mkdir} public</commandlineArgs>
  120. </configuration>
  121. </execution>
  122. <execution>
  123. <id>compile-npm</id>
  124. <phase>compile</phase>
  125. <goals>
  126. <goal>exec</goal>
  127. </goals>
  128. <configuration>
  129. <executable>${executable.npm}</executable>
  130. <workingDirectory>${basedir}</workingDirectory>
  131. <commandlineArgs>${args.npm} install</commandlineArgs>
  132. </configuration>
  133. </execution>
  134. <execution>
  135. <id>compile-brunch</id>
  136. <phase>compile</phase>
  137. <goals>
  138. <goal>exec</goal>
  139. </goals>
  140. <configuration>
  141. <executable>${executable.brunch}</executable>
  142. <workingDirectory>${basedir}</workingDirectory>
  143. <commandlineArgs>${args.brunch} build</commandlineArgs>
  144. </configuration>
  145. </execution>
  146. <execution>
  147. <id>set-ambari-version</id>
  148. <phase>compile</phase>
  149. <goals>
  150. <goal>exec</goal>
  151. </goals>
  152. <configuration>
  153. <!-- sets Ambari version to make it accessible from code -->
  154. <executable>${executable.shell}</executable>
  155. <workingDirectory>${basedir}</workingDirectory>
  156. <commandlineArgs>${args.shell} ${basedir}${dirsep}set-ambari-version.${fileextension.shell} ${ambariVersion}</commandlineArgs>
  157. </configuration>
  158. </execution>
  159. <execution>
  160. <id>set-default-stack-version</id>
  161. <phase>compile</phase>
  162. <goals>
  163. <goal>exec</goal>
  164. </goals>
  165. <configuration>
  166. <!-- sets default stack and version to use for install -->
  167. <executable>${executable.shell}</executable>
  168. <workingDirectory>${basedir}</workingDirectory>
  169. <commandlineArgs>${args.shell} ${basedir}${dirsep}set-default-stack-version.${fileextension.shell} ${defaultStackVersion}</commandlineArgs>
  170. </configuration>
  171. </execution>
  172. <execution>
  173. <id>toggle-experimental</id>
  174. <phase>compile</phase>
  175. <goals>
  176. <goal>exec</goal>
  177. </goals>
  178. <configuration>
  179. <!-- enables experimental features if enableExperimental is set to true -->
  180. <executable>${executable.shell}</executable>
  181. <workingDirectory>${basedir}</workingDirectory>
  182. <commandlineArgs>${args.shell} ${basedir}${dirsep}toggle-experimental.${fileextension.shell} ${enableExperimental}</commandlineArgs>
  183. </configuration>
  184. </execution>
  185. <execution>
  186. <id>ambari-web unit tests</id>
  187. <phase>test</phase>
  188. <goals>
  189. <goal>exec</goal>
  190. </goals>
  191. <configuration>
  192. <skip>${skipTests}</skip>
  193. <executable>${executable.npm}</executable>
  194. <workingDirectory>${basedir}</workingDirectory>
  195. <commandlineArgs>${args.npm} test</commandlineArgs>
  196. </configuration>
  197. </execution>
  198. </executions>
  199. </plugin>
  200. <plugin>
  201. <groupId>org.apache.rat</groupId>
  202. <artifactId>apache-rat-plugin</artifactId>
  203. <configuration>
  204. <excludes>
  205. <exclude>.idea/**</exclude>
  206. <exclude>package.json</exclude>
  207. <exclude>public/**</exclude>
  208. <exclude>public-static/**</exclude>
  209. <exclude>app/assets/**</exclude>
  210. <exclude>vendor/**</exclude>
  211. <exclude>node_modules/**</exclude>
  212. <exclude>node/**</exclude>
  213. <exclude>npm-debug.log</exclude>
  214. </excludes>
  215. </configuration>
  216. <executions>
  217. <execution>
  218. <phase>test</phase>
  219. <goals>
  220. <goal>check</goal>
  221. </goals>
  222. </execution>
  223. </executions>
  224. </plugin>
  225. <plugin>
  226. <groupId>org.vafer</groupId>
  227. <artifactId>jdeb</artifactId>
  228. <version>1.0.1</version>
  229. <executions>
  230. <execution>
  231. <phase>none</phase>
  232. <goals>
  233. <goal>jdeb</goal>
  234. </goals>
  235. </execution>
  236. </executions>
  237. <configuration>
  238. <skip>true</skip>
  239. <submodules>false</submodules>
  240. </configuration>
  241. </plugin>
  242. </plugins>
  243. </build>
  244. <profiles>
  245. <profile>
  246. <id>windows</id>
  247. <activation>
  248. <os>
  249. <family>win</family>
  250. </os>
  251. </activation>
  252. <properties>
  253. <envClassifier>win</envClassifier>
  254. <dirsep>\</dirsep>
  255. <executable.brunch>cmd</executable.brunch>
  256. <args.brunch>/C brunch</args.brunch>
  257. <executable.gzip>${basedir}\gzip-content.cmd</executable.gzip>
  258. <executable.mkdir>cmd</executable.mkdir>
  259. <args.mkdir>/C mkdir</args.mkdir>
  260. <executable.npm>cmd</executable.npm>
  261. <args.npm>/C npm</args.npm>
  262. <executable.rmdir>cmd</executable.rmdir>
  263. <args.rm.clean>/C rmdir /S /Q</args.rm.clean>
  264. <executable.shell>cmd</executable.shell>
  265. <fileextension.shell>cmd</fileextension.shell>
  266. <args.shell>/C</args.shell>
  267. </properties>
  268. </profile>
  269. <profile>
  270. <id>linux</id>
  271. <activation>
  272. <os>
  273. <family>unix</family>
  274. </os>
  275. </activation>
  276. <properties>
  277. <envClassifier>linux</envClassifier>
  278. <dirsep>/</dirsep>
  279. <executable.brunch>brunch</executable.brunch>
  280. <args.brunch></args.brunch>
  281. <executable.gzip>gzip</executable.gzip>
  282. <executable.mkdir>mkdir</executable.mkdir>
  283. <args.mkdir></args.mkdir>
  284. <executable.npm>npm</executable.npm>
  285. <args.npm></args.npm>
  286. <executable.rmdir>rm</executable.rmdir>
  287. <args.rm.clean>-rf</args.rm.clean>
  288. <executable.shell>sh</executable.shell>
  289. <fileextension.shell>sh</fileextension.shell>
  290. <args.shell></args.shell>
  291. </properties>
  292. </profile>
  293. <profile>
  294. <id>pluggable-stack-definition</id>
  295. <activation>
  296. <activeByDefault>false</activeByDefault>
  297. </activation>
  298. <build>
  299. <plugins>
  300. <plugin>
  301. <groupId>org.codehaus.mojo</groupId>
  302. <artifactId>exec-maven-plugin</artifactId>
  303. <version>1.2.1</version>
  304. <executions>
  305. <execution>
  306. <id>copy-pluggable-stack-resources</id>
  307. <phase>initialize</phase>
  308. <goals>
  309. <goal>exec</goal>
  310. </goals>
  311. <configuration>
  312. <!-- Copy stack specific UI resources -->
  313. <executable>${executable.shell}</executable>
  314. <workingDirectory>${basedir}</workingDirectory>
  315. <commandlineArgs>${args.shell} ${basedir}${dirsep}copy-pluggable-stack-resources.${fileextension.shell} ${stack.distribution}</commandlineArgs>
  316. </configuration>
  317. </execution>
  318. </executions>
  319. </plugin>
  320. </plugins>
  321. </build>
  322. </profile>
  323. </profiles>
  324. </project>