2016-03-21 21:03:13 +00:00
|
|
|
<!--
|
|
|
|
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
|
|
|
|
|
2019-05-28 07:29:44 +00:00
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
2016-03-21 21:03:13 +00:00
|
|
|
|
|
|
|
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"
|
2019-05-27 06:24:59 +00:00
|
|
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd">
|
2016-03-21 21:03:13 +00:00
|
|
|
<parent>
|
|
|
|
<artifactId>hadoop-yarn</artifactId>
|
|
|
|
<groupId>org.apache.hadoop</groupId>
|
2024-01-19 07:05:22 +00:00
|
|
|
<version>3.5.0-SNAPSHOT</version>
|
2016-03-21 21:03:13 +00:00
|
|
|
</parent>
|
|
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
<artifactId>hadoop-yarn-ui</artifactId>
|
2024-01-19 07:05:22 +00:00
|
|
|
<version>3.5.0-SNAPSHOT</version>
|
2016-03-21 21:03:13 +00:00
|
|
|
<name>Apache Hadoop YARN UI</name>
|
2017-06-04 16:35:14 +00:00
|
|
|
<packaging>${packagingType}</packaging>
|
2016-03-21 21:03:13 +00:00
|
|
|
|
|
|
|
<properties>
|
2017-06-04 16:35:14 +00:00
|
|
|
<packagingType>pom</packagingType>
|
|
|
|
<webappDir>${basedir}/target/webapp</webappDir>
|
|
|
|
<nodeExecutable>${basedir}/target/webapp/node/node</nodeExecutable>
|
|
|
|
<packageManagerScript>node/yarn/dist/bin/yarn.js</packageManagerScript>
|
|
|
|
<keepUIBuildCache>false</keepUIBuildCache>
|
2016-03-21 21:03:13 +00:00
|
|
|
</properties>
|
|
|
|
|
|
|
|
<build>
|
|
|
|
<plugins>
|
2022-06-15 09:59:55 +00:00
|
|
|
<!-- Pkck the appropriate ember build script to use in src/package.json based on the OS -->
|
|
|
|
<plugin>
|
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
|
<artifactId>maven-antrun-plugin</artifactId>
|
|
|
|
<version>1.8</version>
|
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<phase>validate</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>run</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<exportAntProperties>true</exportAntProperties>
|
|
|
|
<target>
|
|
|
|
<!-- Set the Maven property emberBuildScript to build:mvn:windows if this is
|
|
|
|
running on Windows. Set it to build:mvn otherwise. -->
|
|
|
|
<condition property="emberBuildScript" value="build:mvn:windows" else="build:mvn">
|
|
|
|
<and>
|
|
|
|
<os family="windows"/>
|
|
|
|
</and>
|
|
|
|
</condition>
|
|
|
|
<echo>Ember build script to use = ${emberBuildScript}</echo>
|
|
|
|
</target>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
|
2016-03-21 21:03:13 +00:00
|
|
|
<!-- Apache RAT -->
|
|
|
|
<plugin>
|
|
|
|
<groupId>org.apache.rat</groupId>
|
|
|
|
<artifactId>apache-rat-plugin</artifactId>
|
|
|
|
<configuration>
|
|
|
|
<excludes>
|
|
|
|
<exclude>src/main/webapp/jsconfig.json</exclude>
|
|
|
|
<exclude>src/main/webapp/bower.json</exclude>
|
2017-06-04 16:35:14 +00:00
|
|
|
<exclude>src/main/webapp/bower-shrinkwrap.json</exclude>
|
2016-03-21 21:03:13 +00:00
|
|
|
<exclude>src/main/webapp/package.json</exclude>
|
2017-06-04 16:35:14 +00:00
|
|
|
<exclude>src/main/webapp/yarn.lock</exclude>
|
2016-03-21 21:03:13 +00:00
|
|
|
<exclude>src/main/webapp/testem.json</exclude>
|
|
|
|
<exclude>src/main/webapp/public/assets/images/**/*</exclude>
|
2016-08-30 15:28:35 +00:00
|
|
|
<exclude>src/main/webapp/public/assets/images/*</exclude>
|
2016-03-21 21:03:13 +00:00
|
|
|
<exclude>src/main/webapp/public/robots.txt</exclude>
|
|
|
|
<exclude>public/crossdomain.xml</exclude>
|
2016-08-30 15:28:35 +00:00
|
|
|
<exclude>src/main/webapp/.bowerrc</exclude>
|
|
|
|
<exclude>src/main/webapp/.ember-cli</exclude>
|
|
|
|
<exclude>src/main/webapp/.jshintrc</exclude>
|
|
|
|
<exclude>src/main/webapp/.watchmanconfig</exclude>
|
2017-06-04 16:35:14 +00:00
|
|
|
<exclude>src/main/webapp/WEB-INF/wro.xml</exclude>
|
2016-03-21 21:03:13 +00:00
|
|
|
</excludes>
|
|
|
|
</configuration>
|
|
|
|
</plugin>
|
|
|
|
|
|
|
|
<plugin>
|
2016-08-25 17:51:29 +00:00
|
|
|
<artifactId>maven-clean-plugin</artifactId>
|
|
|
|
<configuration>
|
2017-06-04 16:35:14 +00:00
|
|
|
<skip>${keepUIBuildCache}</skip>
|
2016-08-25 17:51:29 +00:00
|
|
|
<followSymLinks>false</followSymLinks>
|
|
|
|
<filesets>
|
|
|
|
<fileset>
|
2017-06-04 16:35:14 +00:00
|
|
|
<directory>${webappDir}/bower_components</directory>
|
2016-08-25 17:51:29 +00:00
|
|
|
</fileset>
|
|
|
|
<fileset>
|
2017-06-04 16:35:14 +00:00
|
|
|
<directory>${webappDir}/node_modules</directory>
|
2016-08-25 17:51:29 +00:00
|
|
|
</fileset>
|
|
|
|
</filesets>
|
|
|
|
</configuration>
|
2016-03-21 21:03:13 +00:00
|
|
|
</plugin>
|
|
|
|
</plugins>
|
|
|
|
</build>
|
|
|
|
|
|
|
|
<profiles>
|
|
|
|
<profile>
|
|
|
|
<id>yarn-ui</id>
|
|
|
|
|
|
|
|
<activation>
|
|
|
|
<activeByDefault>false</activeByDefault>
|
|
|
|
</activation>
|
|
|
|
|
|
|
|
<properties>
|
2017-06-04 16:35:14 +00:00
|
|
|
<packagingType>war</packagingType>
|
2016-03-21 21:03:13 +00:00
|
|
|
</properties>
|
|
|
|
|
|
|
|
<build>
|
|
|
|
<plugins>
|
2017-06-04 16:35:14 +00:00
|
|
|
<!-- Copy files into target for build -->
|
2016-10-04 15:37:42 +00:00
|
|
|
<plugin>
|
2017-06-04 16:35:14 +00:00
|
|
|
<artifactId>maven-resources-plugin</artifactId>
|
2016-10-04 15:37:42 +00:00
|
|
|
<executions>
|
|
|
|
<execution>
|
2017-06-04 16:35:14 +00:00
|
|
|
<id>copy-resources</id>
|
|
|
|
<!-- here the phase you need -->
|
|
|
|
<phase>validate</phase>
|
2016-10-04 15:37:42 +00:00
|
|
|
<goals>
|
2017-06-04 16:35:14 +00:00
|
|
|
<goal>copy-resources</goal>
|
2016-10-04 15:37:42 +00:00
|
|
|
</goals>
|
|
|
|
<configuration>
|
2017-06-04 16:35:14 +00:00
|
|
|
<outputDirectory>${webappDir}</outputDirectory>
|
|
|
|
<resources>
|
|
|
|
<resource>
|
|
|
|
<directory>${basedir}/src/main/webapp</directory>
|
|
|
|
<filtering>true</filtering>
|
|
|
|
<excludes>
|
|
|
|
<exclude>node_modules/**/*</exclude>
|
|
|
|
<exclude>bower_components/**/*</exclude>
|
|
|
|
<exclude>tmp/**/*</exclude>
|
|
|
|
<exclude>dist/**/*</exclude>
|
2018-12-07 18:55:13 +00:00
|
|
|
<exclude>terminal/**/*</exclude>
|
2017-06-04 16:35:14 +00:00
|
|
|
</excludes>
|
|
|
|
</resource>
|
|
|
|
</resources>
|
2016-10-04 15:37:42 +00:00
|
|
|
</configuration>
|
|
|
|
</execution>
|
2018-12-07 18:55:13 +00:00
|
|
|
<execution>
|
|
|
|
<id>copy-terminal</id>
|
|
|
|
<!-- here the phase you need -->
|
|
|
|
<phase>compile</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>copy-resources</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<outputDirectory>${webappDir}/dist</outputDirectory>
|
|
|
|
<resources>
|
|
|
|
<resource>
|
|
|
|
<directory>${basedir}/src/main/webapp</directory>
|
|
|
|
<filtering>true</filtering>
|
|
|
|
<includes>
|
|
|
|
<include>terminal/**/*</include>
|
|
|
|
</includes>
|
|
|
|
</resource>
|
|
|
|
</resources>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
<execution>
|
|
|
|
<id>copy-xterm</id>
|
|
|
|
<!-- here the phase you need -->
|
|
|
|
<phase>compile</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>copy-resources</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<outputDirectory>${webappDir}/dist/terminal/xterm</outputDirectory>
|
|
|
|
<resources>
|
|
|
|
<resource>
|
|
|
|
<directory>${basedir}/target/webapp/node_modules/xterm</directory>
|
|
|
|
<filtering>true</filtering>
|
|
|
|
<includes>
|
|
|
|
<include>dist/**/*</include>
|
|
|
|
</includes>
|
|
|
|
</resource>
|
|
|
|
</resources>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
2016-10-04 15:37:42 +00:00
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
|
2017-06-04 16:35:14 +00:00
|
|
|
<!-- Install Node, Yarn, Bower & dependencies -->
|
2016-03-21 21:03:13 +00:00
|
|
|
<plugin>
|
2017-03-04 07:43:25 +00:00
|
|
|
<groupId>com.github.eirslett</groupId>
|
|
|
|
<artifactId>frontend-maven-plugin</artifactId>
|
2017-10-20 04:58:31 +00:00
|
|
|
<version>${frontend-maven-plugin.version}</version>
|
2017-03-04 07:43:25 +00:00
|
|
|
<configuration>
|
2017-06-04 16:35:14 +00:00
|
|
|
<workingDirectory>${webappDir}</workingDirectory>
|
2017-03-04 07:43:25 +00:00
|
|
|
</configuration>
|
2016-03-21 21:03:13 +00:00
|
|
|
<executions>
|
2017-06-04 16:35:14 +00:00
|
|
|
|
|
|
|
<!-- Install all dependencies -->
|
2016-03-21 21:03:13 +00:00
|
|
|
<execution>
|
2017-06-04 16:35:14 +00:00
|
|
|
<phase>generate-resources</phase>
|
|
|
|
<id>install node and yarn</id>
|
2016-03-21 21:03:13 +00:00
|
|
|
<goals>
|
2017-06-04 16:35:14 +00:00
|
|
|
<goal>install-node-and-yarn</goal>
|
2016-03-21 21:03:13 +00:00
|
|
|
</goals>
|
|
|
|
<configuration>
|
2022-01-28 06:51:21 +00:00
|
|
|
<nodeVersion>${nodejs.version}</nodeVersion>
|
|
|
|
<yarnVersion>${yarnpkg.version}</yarnVersion>
|
2016-03-21 21:03:13 +00:00
|
|
|
</configuration>
|
|
|
|
</execution>
|
2017-03-04 07:43:25 +00:00
|
|
|
<execution>
|
2017-06-04 16:35:14 +00:00
|
|
|
<phase>generate-resources</phase>
|
|
|
|
<id>yarn install</id>
|
2017-03-04 07:43:25 +00:00
|
|
|
<goals>
|
2017-06-04 16:35:14 +00:00
|
|
|
<goal>yarn</goal>
|
2017-03-04 07:43:25 +00:00
|
|
|
</goals>
|
2017-06-04 16:35:14 +00:00
|
|
|
<configuration>
|
|
|
|
<arguments>install</arguments>
|
|
|
|
</configuration>
|
2017-03-04 07:43:25 +00:00
|
|
|
</execution>
|
2016-03-21 21:03:13 +00:00
|
|
|
<execution>
|
2017-06-04 16:35:14 +00:00
|
|
|
<phase>generate-resources</phase>
|
2016-03-21 21:03:13 +00:00
|
|
|
<id>bower install</id>
|
2017-06-04 16:35:14 +00:00
|
|
|
<configuration>
|
2020-11-24 06:19:25 +00:00
|
|
|
<arguments>install --allow-root</arguments>
|
2017-06-04 16:35:14 +00:00
|
|
|
</configuration>
|
2016-03-21 21:03:13 +00:00
|
|
|
<goals>
|
2017-03-04 07:43:25 +00:00
|
|
|
<goal>bower</goal>
|
2016-03-21 21:03:13 +00:00
|
|
|
</goals>
|
|
|
|
</execution>
|
2017-03-04 07:43:25 +00:00
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
|
|
|
|
<plugin>
|
|
|
|
<groupId>org.codehaus.mojo</groupId>
|
2017-06-04 16:35:14 +00:00
|
|
|
<artifactId>exec-maven-plugin</artifactId>
|
2017-03-04 07:43:25 +00:00
|
|
|
<executions>
|
2017-06-04 16:35:14 +00:00
|
|
|
|
2018-01-30 07:45:06 +00:00
|
|
|
<!-- Ember Build -->
|
2016-03-21 21:03:13 +00:00
|
|
|
<execution>
|
|
|
|
<id>ember build</id>
|
2017-06-04 16:35:14 +00:00
|
|
|
<phase>generate-resources</phase>
|
2016-03-21 21:03:13 +00:00
|
|
|
<goals>
|
|
|
|
<goal>exec</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
2017-06-04 16:35:14 +00:00
|
|
|
<workingDirectory>${webappDir}</workingDirectory>
|
|
|
|
<executable>${nodeExecutable}</executable>
|
2016-03-21 21:03:13 +00:00
|
|
|
<arguments>
|
2017-06-04 16:35:14 +00:00
|
|
|
<argument>${packageManagerScript}</argument>
|
2017-03-15 10:23:57 +00:00
|
|
|
<argument>run</argument>
|
2022-06-15 09:59:55 +00:00
|
|
|
<argument>${emberBuildScript}</argument>
|
2016-03-21 21:03:13 +00:00
|
|
|
</arguments>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
2017-06-04 16:35:14 +00:00
|
|
|
|
2016-03-21 21:03:13 +00:00
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
|
2017-06-04 16:35:14 +00:00
|
|
|
<!-- Asset minifier -->
|
|
|
|
<plugin>
|
|
|
|
<groupId>ro.isdc.wro4j</groupId>
|
|
|
|
<artifactId>wro4j-maven-plugin</artifactId>
|
|
|
|
<version>1.7.9</version>
|
2018-10-02 18:03:43 +00:00
|
|
|
<dependencies>
|
|
|
|
<!-- TODO: Remove this dependency after upgrading wro4j-maven-plugin to 1.8.1 or later. -->
|
|
|
|
<dependency>
|
|
|
|
<groupId>org.mockito</groupId>
|
|
|
|
<artifactId>mockito-core</artifactId>
|
|
|
|
<version>2.18.0</version>
|
|
|
|
</dependency>
|
|
|
|
</dependencies>
|
2017-06-04 16:35:14 +00:00
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<phase>prepare-package</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>run</goal>
|
|
|
|
</goals>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
<configuration>
|
|
|
|
<minimize>true</minimize>
|
|
|
|
<targetGroups>yarn-ui,vendor</targetGroups>
|
|
|
|
<destinationFolder>${basedir}/target/minified-resources/assets</destinationFolder>
|
|
|
|
<contextFolder>${webappDir}/dist/assets</contextFolder>
|
|
|
|
<wroFile>${webappDir}/WEB-INF/wro.xml</wroFile>
|
|
|
|
</configuration>
|
|
|
|
</plugin>
|
|
|
|
|
2016-03-21 21:03:13 +00:00
|
|
|
<!-- Package into war -->
|
|
|
|
<plugin>
|
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
|
<artifactId>maven-war-plugin</artifactId>
|
2017-06-04 16:35:14 +00:00
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<phase>package</phase>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
2016-03-21 21:03:13 +00:00
|
|
|
<configuration>
|
2017-06-04 16:35:14 +00:00
|
|
|
<webXml>${webappDir}/WEB-INF/web.xml</webXml>
|
|
|
|
<warSourceDirectory>${webappDir}/dist</warSourceDirectory>
|
|
|
|
<webResources>
|
|
|
|
<resource>
|
|
|
|
<filtering>false</filtering>
|
|
|
|
<directory>${basedir}/target/minified-resources</directory>
|
|
|
|
</resource>
|
|
|
|
</webResources>
|
|
|
|
</configuration>
|
|
|
|
</plugin>
|
|
|
|
|
|
|
|
<plugin>
|
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
|
<artifactId>maven-jar-plugin</artifactId>
|
|
|
|
<configuration>
|
|
|
|
<skipIfEmpty>true</skipIfEmpty>
|
2016-03-21 21:03:13 +00:00
|
|
|
</configuration>
|
|
|
|
</plugin>
|
|
|
|
|
|
|
|
</plugins>
|
|
|
|
</build>
|
|
|
|
</profile>
|
|
|
|
</profiles>
|
2017-06-04 16:35:14 +00:00
|
|
|
|
2016-03-21 21:03:13 +00:00
|
|
|
</project>
|