Ver código fonte

AMBARI-14936. Tweaks to reduce build time (aonishuk)

Andrew Onishuk 9 anos atrás
pai
commit
77daca7a62
4 arquivos alterados com 9 adições e 7 exclusões
  1. 3 3
      ambari-agent/pom.xml
  2. 3 3
      ambari-server/pom.xml
  3. 2 1
      ambari-web/pom.xml
  4. 1 0
      pom.xml

+ 3 - 3
ambari-agent/pom.xml

@@ -267,7 +267,7 @@
         <executions>
           <execution>
             <id>build-tarball</id>
-            <phase>package</phase>
+            <phase>${assemblyPhase}</phase>
             <goals>
               <goal>single</goal>
             </goals>
@@ -347,7 +347,7 @@
           </execution>
           <execution>
             <id>copy-repo-resources</id>
-            <phase>package</phase>
+            <phase>${assemblyPhase}</phase>
             <goals>
               <goal>copy-resources</goal>
             </goals>
@@ -391,7 +391,7 @@
         <executions>
           <execution>
             <id>rename-file</id>
-            <phase>package</phase>
+            <phase>${assemblyPhase}</phase>
             <goals>
               <goal>rename</goal>
             </goals>

+ 3 - 3
ambari-server/pom.xml

@@ -134,7 +134,7 @@
         <executions>
           <execution>
             <id>build-tarball</id>
-            <phase>package</phase>
+            <phase>${assemblyPhase}</phase>
             <goals>
               <goal>single</goal>
             </goals>
@@ -173,7 +173,7 @@
           </execution>
           <execution>
             <id>copy-repo-resources</id>
-            <phase>package</phase>
+            <phase>${assemblyPhase}</phase>
             <goals>
               <goal>copy-resources</goal>
             </goals>
@@ -217,7 +217,7 @@
         <executions>
           <execution>
             <id>rename-file</id>
-            <phase>package</phase>
+            <phase>${assemblyPhase}</phase>
             <goals>
               <goal>rename</goal>
             </goals>

+ 2 - 1
ambari-web/pom.xml

@@ -32,6 +32,7 @@
   <properties>
     <ambari.dir>${project.parent.parent.basedir}</ambari.dir>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <nodemodules.dir>node_modules</nodemodules.dir> <!-- specify -Dnodemodules.dir option to reduce ambari-web build time by not re-downloading npm modules -->
   </properties>
   <build>
     <plugins>
@@ -100,7 +101,7 @@
             <configuration>
               <executable>${executable.rmdir}</executable>
               <workingDirectory>${basedir}</workingDirectory>
-              <commandlineArgs>${args.rm.clean} public node_modules</commandlineArgs>
+              <commandlineArgs>${args.rm.clean} public ${nodemodules.dir}</commandlineArgs>
               <successCodes>
                 <successCode>0</successCode>
                 <successCode>1</successCode>

+ 1 - 0
pom.xml

@@ -60,6 +60,7 @@
     <distMgmtStagingId>apache.staging.https</distMgmtStagingId>
     <distMgmtStagingName>Apache Release Distribution Repository</distMgmtStagingName>
     <distMgmtStagingUrl>https://repository.apache.org/service/local/staging/deploy/maven2</distMgmtStagingUrl>
+    <assemblyPhase>package</assemblyPhase> <!-- use -DassemblyPhase=none to skip building tarball, useful when you want purely compile jar -->
   </properties>
   <pluginRepositories>
     <pluginRepository>