| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| |
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> |
| <modelVersion>4.0.0</modelVersion> |
| <parent> |
| <groupId>org.apache.tez</groupId> |
| <artifactId>tez</artifactId> |
| <version>0.7.0</version> |
| </parent> |
| <artifactId>tez-ui</artifactId> |
| <packaging>war</packaging> |
| |
| <properties> |
| <webappDir>src/main/webapp</webappDir> |
| <node.executable>${basedir}/src/main/webapp/node/node</node.executable> |
| <nodeVersion>v0.10.18</nodeVersion> |
| <npmVersion>1.3.8</npmVersion> |
| </properties> |
| |
| <build> |
| <plugins> |
| |
| <!-- Apache RAT --> |
| <plugin> |
| <groupId>org.apache.rat</groupId> |
| <artifactId>apache-rat-plugin</artifactId> |
| <configuration> |
| <excludes> |
| <exclude>src/main/webapp/node/**/*</exclude> |
| <exclude>src/main/webapp/node_modules/**/*</exclude> |
| <exclude>src/main/webapp/app/bower_components/**/*</exclude> |
| <exclude>src/main/webapp/.tmp/</exclude> |
| <exclude>src/main/webapp/dist/**/*</exclude> |
| <exclude>src/main/webapp/.bowerrc</exclude> |
| <exclude>src/main/webapp/.jshintrc</exclude> |
| <exclude>src/main/webapp/bower.json</exclude> |
| <exclude>src/main/webapp/package.json</exclude> |
| <exclude>tools/server/nodejs_conf.json</exclude> |
| <exclude>tools/server/package.json</exclude> |
| </excludes> |
| </configuration> |
| </plugin> |
| |
| <!-- NPM Install --> |
| <plugin> |
| <groupId>com.github.eirslett</groupId> |
| <artifactId>frontend-maven-plugin</artifactId> |
| <configuration> |
| <workingDirectory>${webappDir}</workingDirectory> |
| </configuration> |
| <executions> |
| <execution> |
| <phase>generate-sources</phase> |
| <id>install node and npm</id> |
| <goals> |
| <goal>install-node-and-npm</goal> |
| </goals> |
| <configuration> |
| <nodeVersion>${nodeVersion}</nodeVersion> |
| <npmVersion>${npmVersion}</npmVersion> |
| </configuration> |
| </execution> |
| <execution> |
| <phase>generate-sources</phase> |
| <id>npm install</id> |
| <goals> |
| <goal>npm</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <!-- Bower install & grunt build--> |
| <plugin> |
| <artifactId>exec-maven-plugin</artifactId> |
| <groupId>org.codehaus.mojo</groupId> |
| <executions> |
| <execution> |
| <id>Bower install</id> |
| <phase>generate-sources</phase> |
| <goals> |
| <goal>exec</goal> |
| </goals> |
| <configuration> |
| <workingDirectory>${webappDir}</workingDirectory> |
| <executable>${node.executable}</executable> |
| <arguments> |
| <argument>node_modules/bower/bin/bower</argument> |
| <argument>install</argument> |
| <argument>--remove-unnecessary-resolutions=false</argument> |
| </arguments> |
| </configuration> |
| </execution> |
| <execution> |
| <id>grunt build</id> |
| <phase>generate-sources</phase> |
| <goals> |
| <goal>exec</goal> |
| </goals> |
| <configuration> |
| <workingDirectory>${webappDir}</workingDirectory> |
| <executable>${node.executable}</executable> |
| <arguments> |
| <argument>node_modules/grunt-cli/bin/grunt</argument> |
| <argument>build</argument> |
| </arguments> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <!-- Package into war --> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-war-plugin</artifactId> |
| <configuration> |
| <webXml>${basedir}/src/main/webapp/WEB-INF/web.xml</webXml> |
| <warSourceDirectory>${webappDir}/dist</warSourceDirectory> |
| <warSourceExcludes>**/configs.js</warSourceExcludes> |
| <webResources> |
| <resource> |
| <filtering>false</filtering> |
| <directory>${basedir}/src/main/resources/</directory> |
| </resource> |
| <resource> |
| <filtering>false</filtering> |
| <directory>${webappDir}/dist</directory> |
| <exclude>**/configs.js</exclude> |
| </resource> |
| <resource> |
| <filtering>true</filtering> |
| <directory>${webappDir}/dist</directory> |
| <include>**/configs.js</include> |
| </resource> |
| </webResources> |
| </configuration> |
| </plugin> |
| |
| </plugins> |
| </build> |
| </project> |