pom.xml 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  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. <properties>
  23. <ambari.dir>${project.parent.parent.parent.basedir}</ambari.dir>
  24. <tez.view.version>0.7.0.0-SNAPSHOT</tez.view.version>
  25. <tez.version>0.7.0</tez.version>
  26. </properties>
  27. <modelVersion>4.0.0</modelVersion>
  28. <groupId>org.apache.ambari.contrib.views</groupId>
  29. <artifactId>tez-view</artifactId>
  30. <name>Tez</name>
  31. <version>${tez.view.version}</version>
  32. <description>Tez View</description>
  33. <build>
  34. <plugins>
  35. <plugin>
  36. <groupId>org.apache.maven.plugins</groupId>
  37. <artifactId>maven-deploy-plugin</artifactId>
  38. <configuration>
  39. <skip>true</skip>
  40. </configuration>
  41. </plugin>
  42. <plugin>
  43. <groupId>org.codehaus.mojo</groupId>
  44. <artifactId>build-helper-maven-plugin</artifactId>
  45. <version>1.8</version>
  46. <executions>
  47. <execution>
  48. <id>parse-version</id>
  49. <phase>validate</phase>
  50. <goals>
  51. <goal>parse-version</goal>
  52. </goals>
  53. </execution>
  54. <execution>
  55. <id>regex-property</id>
  56. <goals>
  57. <goal>regex-property</goal>
  58. </goals>
  59. <configuration>
  60. <name>ambariVersion</name>
  61. <value>${project.version}</value>
  62. <regex>^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-).*</regex>
  63. <replacement>$1.$2.$3.$4</replacement>
  64. <failIfNoMatch>false</failIfNoMatch>
  65. </configuration>
  66. </execution>
  67. </executions>
  68. </plugin>
  69. <!-- Unpack the dependent war and add to classes directory -->
  70. <plugin>
  71. <groupId>org.apache.maven.plugins</groupId>
  72. <artifactId>maven-dependency-plugin</artifactId>
  73. <version>2.9</version>
  74. <executions>
  75. <execution>
  76. <phase>generate-resources</phase>
  77. <goals>
  78. <goal>copy-dependencies</goal>
  79. </goals>
  80. <configuration>
  81. <outputDirectory>${project.build.directory}/lib</outputDirectory>
  82. <includeScope>runtime</includeScope>
  83. </configuration>
  84. </execution>
  85. <execution>
  86. <id>unpack</id>
  87. <phase>process-resources</phase>
  88. <goals>
  89. <goal>unpack</goal>
  90. </goals>
  91. <configuration>
  92. <artifactItems>
  93. <artifactItem>
  94. <groupId>org.apache.tez</groupId>
  95. <artifactId>tez-ui</artifactId>
  96. <version>${tez.version}</version>
  97. <type>war</type>
  98. <overWrite>false</overWrite>
  99. <outputDirectory>target/classes</outputDirectory>
  100. </artifactItem>
  101. </artifactItems>
  102. <includes>fonts/**/*, img/**/*, scripts/**/*, assets/**/*, config/**/*, styles/**/*, index.html</includes>
  103. </configuration>
  104. </execution>
  105. <execution>
  106. <id>copy-artifact</id>
  107. <phase>package</phase>
  108. <goals>
  109. <goal>copy</goal>
  110. </goals>
  111. <configuration>
  112. <artifactItems>
  113. <artifactItem>
  114. <groupId>${project.groupId}</groupId>
  115. <artifactId>${project.artifactId}</artifactId>
  116. <version>${project.version}</version>
  117. <type>${project.packaging}</type>
  118. </artifactItem>
  119. </artifactItems>
  120. <outputDirectory>${views.jars.dir.rel}</outputDirectory>
  121. </configuration>
  122. </execution>
  123. </executions>
  124. </plugin>
  125. <!-- Adds init view script to the UI -->
  126. <plugin>
  127. <groupId>com.google.code.maven-replacer-plugin</groupId>
  128. <artifactId>replacer</artifactId>
  129. <version>1.5.3</version>
  130. <executions>
  131. <execution>
  132. <phase>process-resources</phase>
  133. <goals>
  134. <goal>replace</goal>
  135. </goals>
  136. </execution>
  137. </executions>
  138. <configuration>
  139. <file>${project.build.directory}/classes/index.html</file>
  140. <replacements>
  141. <replacement>
  142. <token>&lt;/body&gt;</token>
  143. <value>&lt;script src="ambari-scripts/init-view.js"&gt;&lt;/script&gt;&lt;/body&gt;</value>
  144. </replacement>
  145. </replacements>
  146. </configuration>
  147. </plugin>
  148. <plugin>
  149. <groupId>org.vafer</groupId>
  150. <artifactId>jdeb</artifactId>
  151. <version>1.0.1</version>
  152. <executions>
  153. <execution>
  154. <phase>none</phase>
  155. <goals>
  156. <goal>jdeb</goal>
  157. </goals>
  158. </execution>
  159. </executions>
  160. <configuration>
  161. <skip>true</skip>
  162. <submodules>false</submodules>
  163. </configuration>
  164. </plugin>
  165. </plugins>
  166. <resources>
  167. <resource>
  168. <directory>src/main/resources/ui</directory>
  169. <filtering>false</filtering>
  170. <includes>
  171. <include>ambari-scripts/*</include>
  172. </includes>
  173. </resource>
  174. <resource>
  175. <directory>src/main/resources</directory>
  176. <filtering>true</filtering>
  177. <includes>
  178. <include>WEB-INF/web.xml</include>
  179. <include>META-INF/**/*</include>
  180. <include>view.xml</include>
  181. <include>view.log4j.properties</include>
  182. </includes>
  183. </resource>
  184. <resource>
  185. <targetPath>WEB-INF/lib</targetPath>
  186. <filtering>false</filtering>
  187. <directory>target/lib</directory>
  188. </resource>
  189. </resources>
  190. </build>
  191. <dependencies>
  192. <dependency>
  193. <groupId>org.apache.tez</groupId>
  194. <artifactId>tez-ui</artifactId>
  195. <version>${tez.version}</version>
  196. <type>war</type>
  197. </dependency>
  198. <dependency>
  199. <groupId>com.sun.jersey</groupId>
  200. <artifactId>jersey-server</artifactId>
  201. <version>1.8</version>
  202. </dependency>
  203. <dependency>
  204. <groupId>com.sun.jersey</groupId>
  205. <artifactId>jersey-core</artifactId>
  206. <version>1.8</version>
  207. </dependency>
  208. <dependency>
  209. <groupId>org.apache.ambari</groupId>
  210. <artifactId>ambari-views</artifactId>
  211. <version>${ambari.version}</version>
  212. </dependency>
  213. <dependency>
  214. <groupId>javax.servlet</groupId>
  215. <artifactId>servlet-api</artifactId>
  216. <version>2.5</version>
  217. <scope>provided</scope>
  218. </dependency>
  219. <dependency>
  220. <groupId>com.google.inject</groupId>
  221. <artifactId>guice</artifactId>
  222. </dependency>
  223. <dependency>
  224. <groupId>org.slf4j</groupId>
  225. <artifactId>slf4j-api</artifactId>
  226. <version>1.7.5</version>
  227. </dependency>
  228. <dependency>
  229. <groupId>commons-io</groupId>
  230. <artifactId>commons-io</artifactId>
  231. <version>2.4</version>
  232. </dependency>
  233. <dependency>
  234. <groupId>org.apache.httpcomponents</groupId>
  235. <artifactId>httpclient</artifactId>
  236. <version>4.5.2</version>
  237. </dependency>
  238. <dependency>
  239. <groupId>org.apache.httpcomponents</groupId>
  240. <artifactId>httpcore</artifactId>
  241. <version>4.4.3</version>
  242. </dependency>
  243. <dependency>
  244. <groupId>junit</groupId>
  245. <artifactId>junit</artifactId>
  246. <scope>test</scope>
  247. </dependency>
  248. <dependency>
  249. <groupId>org.easymock</groupId>
  250. <artifactId>easymock</artifactId>
  251. <scope>test</scope>
  252. </dependency>
  253. <dependency>
  254. <groupId>org.apache.ambari.contrib.views</groupId>
  255. <artifactId>ambari-views-utils</artifactId>
  256. <version>2.5.0.0.0</version>
  257. </dependency>
  258. </dependencies>
  259. </project>