You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2016/02/05 10:02:48 UTC
ambari git commit: AMBARI-14936. Tweaks to reduce build time
(aonishuk)
Repository: ambari
Updated Branches:
refs/heads/trunk 74d5a0167 -> dc8e5c3c6
AMBARI-14936. Tweaks to reduce build time (aonishuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/dc8e5c3c
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/dc8e5c3c
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/dc8e5c3c
Branch: refs/heads/trunk
Commit: dc8e5c3c68d25e74ab875a87f66959fc86a9631c
Parents: 74d5a01
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Fri Feb 5 11:02:39 2016 +0200
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Fri Feb 5 11:02:39 2016 +0200
----------------------------------------------------------------------
ambari-agent/pom.xml | 40 +++++++++++------------
ambari-server/pom.xml | 6 ++--
ambari-server/src/main/assemblies/server.xml | 2 +-
ambari-web/pom.xml | 3 +-
pom.xml | 18 +---------
5 files changed, 27 insertions(+), 42 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/dc8e5c3c/ambari-agent/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml
index 7531650..d049a6c 100644
--- a/ambari-agent/pom.xml
+++ b/ambari-agent/pom.xml
@@ -89,24 +89,6 @@
<version>3.0</version>
</plugin>
<plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <configuration>
- <tarLongFileMode>gnu</tarLongFileMode>
- <descriptors>
- <descriptor>src/packages/tarball/all.xml</descriptor>
- </descriptors>
- </configuration>
- <executions>
- <execution>
- <id>build-tarball</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
@@ -264,6 +246,24 @@
</configuration>
</plugin>
<plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <configuration>
+ <tarLongFileMode>gnu</tarLongFileMode>
+ <descriptors>
+ <descriptor>src/packages/tarball/all.xml</descriptor>
+ </descriptors>
+ </configuration>
+ <executions>
+ <execution>
+ <id>build-tarball</id>
+ <phase>${assemblyPhase}</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<executions>
@@ -336,7 +336,7 @@
</execution>
<execution>
<id>copy-repo-resources</id>
- <phase>package</phase>
+ <phase>${assemblyPhase}</phase>
<goals>
<goal>copy-resources</goal>
</goals>
@@ -367,7 +367,7 @@
<executions>
<execution>
<id>rename-file</id>
- <phase>package</phase>
+ <phase>${assemblyPhase}</phase>
<goals>
<goal>rename</goal>
</goals>
http://git-wip-us.apache.org/repos/asf/ambari/blob/dc8e5c3c/ambari-server/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml
index 6fb090a..623ddca 100644
--- a/ambari-server/pom.xml
+++ b/ambari-server/pom.xml
@@ -137,7 +137,7 @@
<executions>
<execution>
<id>build-tarball</id>
- <phase>package</phase>
+ <phase>${assemblyPhase}</phase>
<goals>
<goal>single</goal>
</goals>
@@ -176,7 +176,7 @@
</execution>
<execution>
<id>copy-repo-resources</id>
- <phase>package</phase>
+ <phase>${assemblyPhase}</phase>
<goals>
<goal>copy-resources</goal>
</goals>
@@ -207,7 +207,7 @@
<executions>
<execution>
<id>rename-file</id>
- <phase>package</phase>
+ <phase>${assemblyPhase}</phase>
<goals>
<goal>rename</goal>
</goals>
http://git-wip-us.apache.org/repos/asf/ambari/blob/dc8e5c3c/ambari-server/src/main/assemblies/server.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/assemblies/server.xml b/ambari-server/src/main/assemblies/server.xml
index 17d6bdb..8bfad0c 100644
--- a/ambari-server/src/main/assemblies/server.xml
+++ b/ambari-server/src/main/assemblies/server.xml
@@ -306,7 +306,7 @@
</file>
<file>
<fileMode>755</fileMode>
- <source>target/classes/stacks/stack_advisor.py</source>
+ <source>src/main/resources/stacks/stack_advisor.py</source>
<outputDirectory>/var/lib/ambari-server/resources/stacks</outputDirectory>
</file>
<file>
http://git-wip-us.apache.org/repos/asf/ambari/blob/dc8e5c3c/ambari-web/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-web/pom.xml b/ambari-web/pom.xml
index 761a3f0..6304b3d 100644
--- a/ambari-web/pom.xml
+++ b/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>
http://git-wip-us.apache.org/repos/asf/ambari/blob/dc8e5c3c/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 57c6de7..8f321fd 100644
--- a/pom.xml
+++ b/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>
@@ -203,23 +204,6 @@
</configuration>
</plugin>
<plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <configuration>
- <descriptors>
- <descriptor>${ambari.dir}/ambari-project/src/main/assemblies/empty.xml</descriptor>
- </descriptors>
- </configuration>
- <executions>
- <execution>
- <id>make-assembly</id>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>rpm-maven-plugin</artifactId>
<version>2.0.1</version>