You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tez.apache.org by je...@apache.org on 2021/01/15 16:09:14 UTC

[tez] branch master updated: TEZ-3706. add option to skip Tez UI build

This is an automated email from the ASF dual-hosted git repository.

jeagles pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tez.git


The following commit(s) were added to refs/heads/master by this push:
     new 979bf5d  TEZ-3706. add option to skip Tez UI build
979bf5d is described below

commit 979bf5d7d7a1d3d66839e330388d3c9ec975b1c3
Author: László Bodor <bo...@gmail.com>
AuthorDate: Fri Jan 15 10:08:50 2021 -0600

    TEZ-3706. add option to skip Tez UI build
    
    Signed-off-by: Jonathan Eagles <je...@apache.org>
---
 BUILDING.txt   |  10 +++
 pom.xml        |   4 +-
 tez-ui/pom.xml | 277 ++++++++++++++++++++++++++++++++++++++++++++++++---------
 3 files changed, 245 insertions(+), 46 deletions(-)

diff --git a/BUILDING.txt b/BUILDING.txt
index f2231ea..875bf3e 100644
--- a/BUILDING.txt
+++ b/BUILDING.txt
@@ -105,6 +105,16 @@ Issue with PhantomJS on building in PowerPC.
  and install it globally for the build to work.
 
 ----------------------------------------------------------------------------------
+Skip UI build:
+
+In case you want to completely skip UI build, you can use 'noui' profile.
+For instance, a full build without tests and tez-ui looks like:
+
+ $ mvn clean install -DskipTests -Pnoui
+
+It's important to note that maven will still include tez-ui project, but all of the maven plugins are skipped.
+
+----------------------------------------------------------------------------------
 Protocol Buffer compiler:
 
 The version of Protocol Buffer compiler, protoc, must be 2.5.0 and match the
diff --git a/pom.xml b/pom.xml
index 04088bd..59ec193 100644
--- a/pom.xml
+++ b/pom.xml
@@ -825,7 +825,7 @@
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-war-plugin</artifactId>
-          <version>2.5</version>
+          <version>3.2.3</version>
         </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
@@ -921,7 +921,7 @@
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-resources-plugin</artifactId>
-          <version>2.6</version>
+          <version>3.1.0</version>
           <configuration>
             <encoding>UTF-8</encoding>
           </configuration>
diff --git a/tez-ui/pom.xml b/tez-ui/pom.xml
index 500d21a..e52eb52 100644
--- a/tez-ui/pom.xml
+++ b/tez-ui/pom.xml
@@ -40,6 +40,173 @@
   </properties>
 
   <profiles>
+    <!-- profile to be activated if -Dtest is not provided: 'mvn clean install' -->
+    <!-- runs 'ember test' execution if -DskipTests is not provided -->
+    <profile>
+      <id>default</id>
+      <activation>
+        <property>
+          <name>!test</name>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+        <plugin>
+          <artifactId>exec-maven-plugin</artifactId>
+          <groupId>org.codehaus.mojo</groupId>
+          <executions>
+            <!-- Build -->
+            <execution>
+              <id>ember build</id>
+              <phase>generate-resources</phase>
+              <goals>
+                <goal>exec</goal>
+              </goals>
+              <configuration>
+                <workingDirectory>${webappDir}</workingDirectory>
+                <executable>${nodeExecutable}</executable>
+                <arguments>
+                  <argument>${packageManagerScript}</argument>
+                  <argument>run</argument>
+                  <argument>build:mvn</argument>
+                </arguments>
+              </configuration>
+            </execution>
+
+            <!-- Test if enabled-->
+            <execution>
+              <id>ember test</id>
+              <phase>test</phase>
+              <goals>
+                <goal>exec</goal>
+              </goals>
+              <configuration>
+                <skip>${skipTests}</skip>
+                <workingDirectory>${webappDir}</workingDirectory>
+                <executable>${nodeExecutable}</executable>
+                <arguments>
+                  <argument>${packageManagerScript}</argument>
+                  <argument>run</argument>
+                  <argument>test:mvn</argument>
+                </arguments>
+              </configuration>
+            </execution>
+          </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+
+    <!-- profile to be activated if -Dtest=ember: 'mvn clean install -Dtest=ember' -->
+    <!-- runs 'ember test' execution -->
+    <profile>
+      <id>ui-tests</id>
+      <activation>
+        <property>
+          <name>test</name>
+          <value>ember</value>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+        <plugin>
+          <artifactId>exec-maven-plugin</artifactId>
+          <groupId>org.codehaus.mojo</groupId>
+          <executions>
+            <!-- Build -->
+            <execution>
+              <id>ember build</id>
+              <phase>generate-resources</phase>
+              <goals>
+                <goal>exec</goal>
+              </goals>
+              <configuration>
+                <workingDirectory>${webappDir}</workingDirectory>
+                <executable>${nodeExecutable}</executable>
+                <arguments>
+                  <argument>${packageManagerScript}</argument>
+                  <argument>run</argument>
+                  <argument>build:mvn</argument>
+                </arguments>
+              </configuration>
+            </execution>
+
+            <!-- Test if enabled-->
+            <execution>
+              <id>ember test</id>
+              <phase>test</phase>
+              <goals>
+                <goal>exec</goal>
+              </goals>
+              <configuration>
+                <skip>${skipTests}</skip>
+                <workingDirectory>${webappDir}</workingDirectory>
+                <executable>${nodeExecutable}</executable>
+                <arguments>
+                  <argument>${packageManagerScript}</argument>
+                  <argument>run</argument>
+                  <argument>test:mvn</argument>
+                </arguments>
+              </configuration>
+            </execution>
+          </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+
+    <!-- profile to be activated if -Dtest is defined but it doesn't equal to 'ember': 'mvn clean install -Dtest=TestAnythingElse' -->
+    <!-- doesn't run 'ember test' execution -->
+    <profile>
+      <id>no-ui-tests</id>
+      <activation>
+        <property>
+          <name>test</name>
+          <value>.*</value>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+        <plugin>
+          <artifactId>exec-maven-plugin</artifactId>
+          <groupId>org.codehaus.mojo</groupId>
+          <executions>
+            <!-- Build -->
+            <execution>
+              <id>ember build</id>
+              <phase>generate-resources</phase>
+              <goals>
+                <goal>exec</goal>
+              </goals>
+              <configuration>
+                <workingDirectory>${webappDir}</workingDirectory>
+                <executable>${nodeExecutable}</executable>
+                <arguments>
+                  <argument>${packageManagerScript}</argument>
+                  <argument>run</argument>
+                  <argument>build:mvn</argument>
+                </arguments>
+              </configuration>
+            </execution>
+
+            <!-- Test - to be skipped -->
+            <execution>
+                <id>ember test</id>
+                <phase>test</phase>
+                <goals>
+                  <goal>exec</goal>
+                </goals>
+                <configuration>
+                  <executable>${nodeExecutable}</executable>
+                  <skip>true</skip>
+                </configuration>
+              </execution>
+          </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+
     <!-- Clear temporary directories -->
     <profile>
       <id>cleanUICache</id>
@@ -86,6 +253,72 @@
         <allow-root-build>--allow-root=true</allow-root-build>
       </properties>
     </profile>
+    <profile>
+      <id>noui</id>
+      <activation>
+        <activeByDefault>false</activeByDefault>
+      </activation>
+      <build>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.rat</groupId>
+          <artifactId>apache-rat-plugin</artifactId>
+          <configuration>
+            <skip>true</skip>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>com.github.eirslett</groupId>
+          <artifactId>frontend-maven-plugin</artifactId>
+          <configuration>
+            <skip>true</skip>
+          </configuration>
+        </plugin>
+        <plugin>
+          <artifactId>exec-maven-plugin</artifactId>
+          <groupId>org.codehaus.mojo</groupId>
+          <configuration>
+            <skip>true</skip>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>ro.isdc.wro4j</groupId>
+          <artifactId>wro4j-maven-plugin</artifactId>
+          <configuration>
+            <skip>true</skip>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-war-plugin</artifactId>
+          <configuration>
+            <skip>true</skip>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-jar-plugin</artifactId>
+          <configuration>
+            <skip>true</skip>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-resources-plugin</artifactId>
+          <configuration>
+            <skip>true</skip>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-install-plugin</artifactId>
+          <configuration>
+            <skip>true</skip>
+          </configuration>
+        </plugin>
+      </plugins>
+      </build>
+    </profile>
   </profiles>
 
   <build>
@@ -167,50 +400,6 @@
         </executions>
       </plugin>
 
-      <plugin>
-        <artifactId>exec-maven-plugin</artifactId>
-        <groupId>org.codehaus.mojo</groupId>
-        <executions>
-
-          <!-- Build -->
-          <execution>
-            <id>ember build</id>
-            <phase>generate-resources</phase>
-            <goals>
-              <goal>exec</goal>
-            </goals>
-            <configuration>
-              <workingDirectory>${webappDir}</workingDirectory>
-              <executable>${nodeExecutable}</executable>
-              <arguments>
-                <argument>${packageManagerScript}</argument>
-                <argument>run</argument>
-                <argument>build:mvn</argument>
-              </arguments>
-            </configuration>
-          </execution>
-
-          <!-- Test if enabled-->
-          <execution>
-            <id>ember test</id>
-            <phase>test</phase>
-            <goals>
-              <goal>exec</goal>
-            </goals>
-            <configuration>
-              <skip>${skipTests}</skip>
-              <workingDirectory>${webappDir}</workingDirectory>
-              <executable>${nodeExecutable}</executable>
-              <arguments>
-                <argument>${packageManagerScript}</argument>
-                <argument>run</argument>
-                <argument>test:mvn</argument>
-              </arguments>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-
       <!-- Asset minifier -->
       <plugin>
         <groupId>ro.isdc.wro4j</groupId>