Skip to content

Commit

Permalink
AMBARI-14936. Tweaks to reduce build time (aonishuk)
Browse files Browse the repository at this point in the history
  • Loading branch information
aonishuk committed Feb 5, 2016
1 parent 74d5a01 commit dc8e5c3
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 42 deletions.
40 changes: 20 additions & 20 deletions ambari-agent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,24 +88,6 @@
<artifactId>maven-compiler-plugin</artifactId>
<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>
Expand Down Expand Up @@ -263,6 +245,24 @@
</dataSet>
</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>
Expand Down Expand Up @@ -336,7 +336,7 @@
</execution>
<execution>
<id>copy-repo-resources</id>
<phase>package</phase>
<phase>${assemblyPhase}</phase>
<goals>
<goal>copy-resources</goal>
</goals>
Expand Down Expand Up @@ -367,7 +367,7 @@
<executions>
<execution>
<id>rename-file</id>
<phase>package</phase>
<phase>${assemblyPhase}</phase>
<goals>
<goal>rename</goal>
</goals>
Expand Down
6 changes: 3 additions & 3 deletions ambari-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
<executions>
<execution>
<id>build-tarball</id>
<phase>package</phase>
<phase>${assemblyPhase}</phase>
<goals>
<goal>single</goal>
</goals>
Expand Down Expand Up @@ -176,7 +176,7 @@
</execution>
<execution>
<id>copy-repo-resources</id>
<phase>package</phase>
<phase>${assemblyPhase}</phase>
<goals>
<goal>copy-resources</goal>
</goals>
Expand Down Expand Up @@ -207,7 +207,7 @@
<executions>
<execution>
<id>rename-file</id>
<phase>package</phase>
<phase>${assemblyPhase}</phase>
<goals>
<goal>rename</goal>
</goals>
Expand Down
2 changes: 1 addition & 1 deletion ambari-server/src/main/assemblies/server.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
3 changes: 2 additions & 1 deletion ambari-web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
18 changes: 1 addition & 17 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -202,23 +203,6 @@
<target>1.7</target>
</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>
Expand Down

0 comments on commit dc8e5c3

Please sign in to comment.