TEZ-3801. Update version in master to 0.9.1 (zhiyuany)
[tez.git] / tez-ui / pom.xml
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
9 http://www.apache.org/licenses/LICENSE-2.0
10
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16 -->
17
18 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
20 <modelVersion>4.0.0</modelVersion>
21 <parent>
22 <groupId>org.apache.tez</groupId>
23 <artifactId>tez</artifactId>
24 <version>0.9.1-SNAPSHOT</version>
25 </parent>
26 <artifactId>tez-ui</artifactId>
27 <packaging>war</packaging>
28
29 <properties>
30 <webappDir>src/main/webapp</webappDir>
31
32 <nodeVersion>v5.12.0</nodeVersion>
33 <nodeExecutable>${basedir}/src/main/webapp/node/node</nodeExecutable>
34
35 <packageManagerScript>node/yarn/dist/bin/yarn.js</packageManagerScript>
36
37 <skipTests>false</skipTests>
38 </properties>
39
40 <profiles>
41 <!-- Clear temporary directories -->
42 <profile>
43 <id>cleanUICache</id>
44 <activation>
45 <activeByDefault>false</activeByDefault>
46 </activation>
47 <build>
48 <plugins>
49 <plugin>
50 <groupId>org.apache.maven.plugins</groupId>
51 <artifactId>maven-clean-plugin</artifactId>
52 <configuration>
53 <filesets>
54 <fileset>
55 <directory>${webappDir}/dist</directory>
56 </fileset>
57 <fileset>
58 <directory>${webappDir}/tmp</directory>
59 </fileset>
60 <fileset>
61 <directory>${webappDir}/node</directory>
62 </fileset>
63 <fileset>
64 <directory>${webappDir}/node_modules</directory>
65 </fileset>
66 <fileset>
67 <directory>${webappDir}/bower_components</directory>
68 </fileset>
69 </filesets>
70 </configuration>
71 </plugin>
72 </plugins>
73 </build>
74 </profile>
75 </profiles>
76
77 <build>
78 <plugins>
79
80 <!-- Apache RAT check -->
81 <plugin>
82 <groupId>org.apache.rat</groupId>
83 <artifactId>apache-rat-plugin</artifactId>
84 <configuration>
85 <excludes>
86 <exclude>src/main/webapp/node/**/*</exclude>
87 <exclude>src/main/webapp/node_modules/**/*</exclude>
88 <exclude>src/main/webapp/bower_components/**/*</exclude>
89 <exclude>src/main/webapp/.tmp/**/*</exclude>
90 <exclude>src/main/webapp/dist/**/*</exclude>
91 <exclude>src/main/webapp/tmp/**/*</exclude>
92 <exclude>src/main/webapp/.bowerrc</exclude>
93 <exclude>src/main/webapp/.editorconfig</exclude>
94 <exclude>src/main/webapp/.ember-cli</exclude>
95 <exclude>src/main/webapp/.gitignore</exclude>
96 <exclude>src/main/webapp/.jshintrc</exclude>
97 <exclude>src/main/webapp/tests/.jshintrc</exclude>
98 <exclude>src/main/webapp/blueprints/.jshintrc</exclude>
99 <exclude>src/main/webapp/.watchmanconfig</exclude>
100 <exclude>src/main/webapp/bower.json</exclude>
101 <exclude>src/main/webapp/bower-shrinkwrap.json</exclude>
102 <exclude>src/main/webapp/ember-cli-build.js</exclude>
103 <exclude>src/main/webapp/package.json</exclude>
104 <exclude>src/main/webapp/yarn.lock</exclude>
105 <exclude>src/main/webapp/testem.json</exclude>
106 <exclude>src/main/webapp/public/assets/images/*</exclude>
107 <exclude>src/main/webapp/WEB-INF/wro.xml</exclude>
108 </excludes>
109 </configuration>
110 </plugin>
111
112 <!-- Install Node, Yarn, Bower & dependencies -->
113 <plugin>
114 <groupId>com.github.eirslett</groupId>
115 <artifactId>frontend-maven-plugin</artifactId>
116 <configuration>
117 <workingDirectory>${webappDir}</workingDirectory>
118 </configuration>
119 <executions>
120
121 <!-- Install all dependencies -->
122 <execution>
123 <phase>generate-resources</phase>
124 <id>install node and yarn</id>
125 <goals>
126 <goal>install-node-and-yarn</goal>
127 </goals>
128 <configuration>
129 <nodeVersion>${nodeVersion}</nodeVersion>
130 <yarnVersion>v0.21.3</yarnVersion>
131 </configuration>
132 </execution>
133 <execution>
134 <phase>generate-resources</phase>
135 <id>yarn install</id>
136 <goals>
137 <goal>yarn</goal>
138 </goals>
139 <configuration>
140 <arguments>install</arguments>
141 </configuration>
142 </execution>
143 <execution>
144 <phase>generate-resources</phase>
145 <id>bower install</id>
146 <configuration>
147 <arguments>install</arguments>
148 </configuration>
149 <goals>
150 <goal>bower</goal>
151 </goals>
152 </execution>
153 </executions>
154 </plugin>
155
156 <plugin>
157 <artifactId>exec-maven-plugin</artifactId>
158 <groupId>org.codehaus.mojo</groupId>
159 <executions>
160
161 <!-- Build -->
162 <execution>
163 <id>ember build</id>
164 <phase>generate-resources</phase>
165 <goals>
166 <goal>exec</goal>
167 </goals>
168 <configuration>
169 <workingDirectory>${webappDir}</workingDirectory>
170 <executable>${nodeExecutable}</executable>
171 <arguments>
172 <argument>${packageManagerScript}</argument>
173 <argument>run</argument>
174 <argument>build:mvn</argument>
175 </arguments>
176 </configuration>
177 </execution>
178
179 <!-- Test if enabled-->
180 <execution>
181 <id>ember test</id>
182 <phase>test</phase>
183 <goals>
184 <goal>exec</goal>
185 </goals>
186 <configuration>
187 <skip>${skipTests}</skip>
188 <workingDirectory>${webappDir}</workingDirectory>
189 <executable>${nodeExecutable}</executable>
190 <arguments>
191 <argument>${packageManagerScript}</argument>
192 <argument>run</argument>
193 <argument>test:mvn</argument>
194 </arguments>
195 </configuration>
196 </execution>
197 </executions>
198 </plugin>
199
200 <!-- Asset minifier -->
201 <plugin>
202 <groupId>ro.isdc.wro4j</groupId>
203 <artifactId>wro4j-maven-plugin</artifactId>
204 <executions>
205 <execution>
206 <phase>prepare-package</phase>
207 <goals>
208 <goal>run</goal>
209 </goals>
210 </execution>
211 </executions>
212 <configuration>
213 <minimize>true</minimize>
214 <targetGroups>tez-ui,vendor</targetGroups>
215 <destinationFolder>${basedir}/target/minified-resources/assets</destinationFolder>
216 <contextFolder>${webappDir}/dist/assets</contextFolder>
217 <wroFile>${basedir}/src/main/webapp/WEB-INF/wro.xml</wroFile>
218 </configuration>
219 </plugin>
220
221 <!-- Package into war -->
222 <plugin>
223 <groupId>org.apache.maven.plugins</groupId>
224 <artifactId>maven-war-plugin</artifactId>
225 <executions>
226 <execution>
227 <phase>package</phase>
228 </execution>
229 </executions>
230 <configuration>
231 <webXml>${basedir}/src/main/webapp/WEB-INF/web.xml</webXml>
232 <warSourceDirectory>${webappDir}/dist</warSourceDirectory>
233 <webResources>
234 <resource>
235 <filtering>false</filtering>
236 <directory>${basedir}/src/main/resources/</directory>
237 </resource>
238 <resource>
239 <filtering>false</filtering>
240 <directory>${basedir}/target/minified-resources</directory>
241 </resource>
242 </webResources>
243 </configuration>
244 </plugin>
245
246 <plugin>
247 <groupId>org.apache.maven.plugins</groupId>
248 <artifactId>maven-jar-plugin</artifactId>
249 <configuration>
250 <skipIfEmpty>true</skipIfEmpty>
251 </configuration>
252 </plugin>
253 </plugins>
254 </build>
255 </project>