YARN-5682. [YARN-3368] Fix maven build to keep all generated or downloaded files in target folder (Wangda Tan via Sunil G)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/04c6fb85 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/04c6fb85 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/04c6fb85 Branch: refs/heads/YARN-3368 Commit: 04c6fb85f19f993747f8e88e83dc89731442fa02 Parents: 0a7a978 Author: sunilg <sun...@apache.org> Authored: Tue Oct 4 21:07:42 2016 +0530 Committer: Wangda Tan <wan...@apache.org> Committed: Fri Oct 21 13:56:31 2016 -0700 ---------------------------------------------------------------------- .../hadoop-yarn/hadoop-yarn-ui/pom.xml | 54 ++++++++++++-------- hadoop-yarn-project/hadoop-yarn/pom.xml | 2 +- 2 files changed, 34 insertions(+), 22 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/04c6fb85/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/pom.xml ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/pom.xml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/pom.xml index b750a73..440aca9 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/pom.xml +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/pom.xml @@ -31,7 +31,7 @@ <properties> <packaging.type>war</packaging.type> - <webappDir>src/main/webapp</webappDir> + <webappTgtDir>${basedir}/target/src/main/webapp</webappTgtDir> <node.executable>node</node.executable> <nodeVersion>v0.12.2</nodeVersion> <npmVersion>2.10.0</npmVersion> @@ -84,10 +84,10 @@ <followSymLinks>false</followSymLinks> <filesets> <fileset> - <directory>${basedir}/src/main/webapp/bower_components</directory> + <directory>${webappTgtDir}/bower_components</directory> </fileset> <fileset> - <directory>${basedir}/src/main/webapp/node_modules</directory> + <directory>${webappTgtDir}/node_modules</directory> </fileset> </filesets> </configuration> @@ -109,6 +109,33 @@ <build> <plugins> + <!-- prepare source code --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + <executions> + <execution> + <id>prepare-source-code</id> + <phase>generate-sources</phase> + <goals> + <goal>run</goal> + </goals> + <configuration> + <target> + <copy toDir="${basedir}/target/src/main/webapp"> + <fileset dir="${basedir}/src/main/webapp"/> + </copy> + + <copy toDir="${basedir}/target/src/public"> + <fileset dir="${basedir}/public"/> + </copy> + </target> + </configuration> + </execution> + </executions> + </plugin> + + <!-- Bower install & grunt build--> <plugin> <artifactId>exec-maven-plugin</artifactId> @@ -121,7 +148,7 @@ <goal>exec</goal> </goals> <configuration> - <workingDirectory>${webappDir}</workingDirectory> + <workingDirectory>${webappTgtDir}</workingDirectory> <executable>npm</executable> <arguments> <argument>install</argument> @@ -135,7 +162,7 @@ <goal>exec</goal> </goals> <configuration> - <workingDirectory>${webappDir}</workingDirectory> + <workingDirectory>${webappTgtDir}</workingDirectory> <executable>bower</executable> <arguments> <argument>--allow-root</argument> @@ -150,7 +177,7 @@ <goal>exec</goal> </goals> <configuration> - <workingDirectory>${webappDir}</workingDirectory> + <workingDirectory>${webappTgtDir}</workingDirectory> <executable>ember</executable> <arguments> <argument>build</argument> @@ -160,21 +187,6 @@ </arguments> </configuration> </execution> - <execution> - <id>cleanup tmp</id> - <phase>generate-sources</phase> - <goals> - <goal>exec</goal> - </goals> - <configuration> - <workingDirectory>${webappDir}</workingDirectory> - <executable>rm</executable> - <arguments> - <argument>-rf</argument> - <argument>tmp</argument> - </arguments> - </configuration> - </execution> </executions> </plugin> http://git-wip-us.apache.org/repos/asf/hadoop/blob/04c6fb85/hadoop-yarn-project/hadoop-yarn/pom.xml ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/pom.xml b/hadoop-yarn-project/hadoop-yarn/pom.xml index ca78ef8..70b68d7 100644 --- a/hadoop-yarn-project/hadoop-yarn/pom.xml +++ b/hadoop-yarn-project/hadoop-yarn/pom.xml @@ -230,7 +230,6 @@ </profiles> <modules> - <module>hadoop-yarn-ui</module> <module>hadoop-yarn-api</module> <module>hadoop-yarn-common</module> <module>hadoop-yarn-server</module> @@ -238,5 +237,6 @@ <module>hadoop-yarn-site</module> <module>hadoop-yarn-client</module> <module>hadoop-yarn-registry</module> + <module>hadoop-yarn-ui</module> </modules> </project> --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org