Repository: ambari Updated Branches: refs/heads/trunk 9a1b0eb4e -> c37394ad0
Revert "AMBARI-10243 [WinTP2] ambari-web build is incomplete" This reverts commit 9a1b0eb4ec0b54381aa5987574bd98cae1c4ee76. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c37394ad Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c37394ad Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c37394ad Branch: refs/heads/trunk Commit: c37394ad06526c8eaec826af95282b99aa4ccb9e Parents: 9a1b0eb Author: Florian Barca <[email protected]> Authored: Mon Mar 30 16:31:14 2015 -0700 Committer: Florian Barca <[email protected]> Committed: Mon Mar 30 16:31:14 2015 -0700 ---------------------------------------------------------------------- ambari-agent/pom.xml | 4 +- ambari-client/python-client/pom.xml | 2 +- ambari-metrics/ambari-metrics-assembly/pom.xml | 2 +- ambari-server/pom.xml | 4 +- ambari-shell/ambari-python-shell/pom.xml | 2 +- ambari-web/pom.xml | 168 ++++++++------------ ambari-web/set-ambari-version.cmd | 17 -- ambari-web/set-ambari-version.ps1 | 27 ---- ambari-web/set-default-stack-version.cmd | 17 -- ambari-web/set-default-stack-version.ps1 | 35 ---- ambari-web/toggle-experimental.cmd | 17 -- ambari-web/toggle-experimental.ps1 | 27 ---- contrib/views/slider/pom.xml | 133 ++++++---------- 13 files changed, 119 insertions(+), 336 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/c37394ad/ambari-agent/pom.xml ---------------------------------------------------------------------- diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml index 4476011..110a8d5 100644 --- a/ambari-agent/pom.xml +++ b/ambari-agent/pom.xml @@ -113,7 +113,7 @@ <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> - <version>1.2.1</version> + <version>1.2</version> <executions> <execution> <configuration> @@ -799,7 +799,7 @@ <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> - <version>1.2.1</version> + <version>1.2</version> <executions> <execution> <id>run-heat</id> http://git-wip-us.apache.org/repos/asf/ambari/blob/c37394ad/ambari-client/python-client/pom.xml ---------------------------------------------------------------------- diff --git a/ambari-client/python-client/pom.xml b/ambari-client/python-client/pom.xml index 73a6825..3c957ee 100644 --- a/ambari-client/python-client/pom.xml +++ b/ambari-client/python-client/pom.xml @@ -71,7 +71,7 @@ <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> - <version>1.2.1</version> + <version>1.2</version> <executions> <execution> <configuration> http://git-wip-us.apache.org/repos/asf/ambari/blob/c37394ad/ambari-metrics/ambari-metrics-assembly/pom.xml ---------------------------------------------------------------------- diff --git a/ambari-metrics/ambari-metrics-assembly/pom.xml b/ambari-metrics/ambari-metrics-assembly/pom.xml index 296d399..cf7a92d 100644 --- a/ambari-metrics/ambari-metrics-assembly/pom.xml +++ b/ambari-metrics/ambari-metrics-assembly/pom.xml @@ -925,7 +925,7 @@ <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> - <version>1.2.1</version> + <version>1.2</version> <executions> <execution> <id>run-heat-collector</id> http://git-wip-us.apache.org/repos/asf/ambari/blob/c37394ad/ambari-server/pom.xml ---------------------------------------------------------------------- diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml index 1e6be0c..18593bd 100644 --- a/ambari-server/pom.xml +++ b/ambari-server/pom.xml @@ -1133,7 +1133,7 @@ <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> - <version>1.2.1</version> + <version>1.2</version> <executions> <execution> <configuration> @@ -1358,7 +1358,7 @@ <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> - <version>1.2.1</version> + <version>1.2</version> <executions> <execution> <id>run-heat</id> http://git-wip-us.apache.org/repos/asf/ambari/blob/c37394ad/ambari-shell/ambari-python-shell/pom.xml ---------------------------------------------------------------------- diff --git a/ambari-shell/ambari-python-shell/pom.xml b/ambari-shell/ambari-python-shell/pom.xml index c4dddf4..d78c6ea 100644 --- a/ambari-shell/ambari-python-shell/pom.xml +++ b/ambari-shell/ambari-python-shell/pom.xml @@ -71,7 +71,7 @@ <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> - <version>1.2.1</version> + <version>1.2</version> <executions> <execution> <configuration> http://git-wip-us.apache.org/repos/asf/ambari/blob/c37394ad/ambari-web/pom.xml ---------------------------------------------------------------------- diff --git a/ambari-web/pom.xml b/ambari-web/pom.xml index 04f9b5d..0849111 100644 --- a/ambari-web/pom.xml +++ b/ambari-web/pom.xml @@ -87,130 +87,90 @@ </configuration> </plugin> <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>exec-maven-plugin</artifactId> - <version>1.2.1</version> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + <version>1.7</version> <executions> <execution> - <id>clean-rmdir</id> + <id>clean</id> <phase>clean</phase> <goals> - <goal>exec</goal> - </goals> - <configuration> - <executable>${executable.rmdir}</executable> - <workingDirectory>${basedir}</workingDirectory> - <commandlineArgs>${args.rm.clean} public node_modules</commandlineArgs> - <successCodes> - <successCode>0</successCode> - <successCode>1</successCode> - <successCode>2</successCode> - </successCodes> - </configuration> - </execution> - <execution> - <id>clean-mkdir</id> - <phase>clean</phase> - <goals> - <goal>exec</goal> - </goals> - <configuration> - <executable>${executable.mkdir}</executable> - <workingDirectory>${basedir}</workingDirectory> - <commandlineArgs>${args.mkdir} public</commandlineArgs> - </configuration> - </execution> - <execution> - <id>compile-npm</id> - <phase>compile</phase> - <goals> - <goal>exec</goal> - </goals> - <configuration> - <executable>${executable.npm}</executable> - <workingDirectory>${basedir}</workingDirectory> - <commandlineArgs>${args.npm} install</commandlineArgs> - </configuration> - </execution> - <execution> - <id>compile-brunch</id> - <phase>compile</phase> - <goals> - <goal>exec</goal> - </goals> - <configuration> - <executable>${executable.brunch}</executable> - <workingDirectory>${basedir}</workingDirectory> - <commandlineArgs>${args.brunch} build</commandlineArgs> - </configuration> - </execution> - <execution> - <id>set-ambari-version</id> - <phase>compile</phase> - <goals> - <goal>exec</goal> - </goals> - <configuration> - <!-- sets Ambari version to make it accessible from code --> - <executable>${executable.shell}</executable> - <workingDirectory>${basedir}</workingDirectory> - <commandlineArgs>${args.shell} ${basedir}${dirsep}set-ambari-version.${fileextension.shell} ${ambariVersion}</commandlineArgs> - </configuration> - </execution> - <execution> - <id>set-default-stack-version</id> - <phase>compile</phase> - <goals> - <goal>exec</goal> + <goal>run</goal> </goals> <configuration> - <!-- sets default stack and version to use for install --> - <executable>${executable.shell}</executable> - <workingDirectory>${basedir}</workingDirectory> - <commandlineArgs>${args.shell} ${basedir}${dirsep}set-default-stack-version.${fileextension.shell} ${defaultStackVersion}</commandlineArgs> + <target name="ambari-web-clean"> + <exec dir="${basedir}" executable="${executable.rmdir}"> + <arg value="${args.rm.clean}"/> + <arg value="public"/> + <arg value="node_modules"/> + </exec> + <exec dir="${basedir}" executable="${executable.mkdir}"> + <arg value="${args.mkdir.clean}"/> + </exec> + </target> </configuration> </execution> <execution> - <id>toggle-experimental</id> + <id>compile</id> <phase>compile</phase> <goals> - <goal>exec</goal> + <goal>run</goal> </goals> <configuration> - <!-- enables experimental features if enableExperimental is set to true --> - <executable>${executable.shell}</executable> - <workingDirectory>${basedir}</workingDirectory> - <commandlineArgs>${args.shell} ${basedir}${dirsep}toggle-experimental.${fileextension.shell} ${enableExperimental}</commandlineArgs> + <target name="ambari-web-compile"> + <exec dir="${basedir}" executable="${executable.npm}" failonerror="true"> + <arg value="${args.npm.install}"/> + </exec> + <exec dir="${basedir}" executable="${executable.brunch}" failonerror="true"> + <arg value="${args.brunch.build}"/> + </exec> + <!-- sets Ambari version to make it accessible from code --> + <exec dir="${basedir}" executable="${executable.shell}" failonerror="true"> + <arg value="${basedir}${dirsep}set-ambari-version.${fileextension.shell}"/> + <arg value="${ambariVersion}"/> + </exec> + <!-- sets default stack and version to use for install --> + <exec dir="${basedir}" executable="${executable.shell}" failonerror="true"> + <arg value="${basedir}${dirsep}set-default-stack-version.${fileextension.shell}"/> + <arg value="${defaultStackVersion}"/> + </exec> + <!-- enables experimental features if enableExperimental is set to true --> + <exec dir="${basedir}" executable="${executable.shell}" failonerror="true"> + <arg value="${basedir}${dirsep}toggle-experimental.${fileextension.shell}"/> + <arg value="${enableExperimental}"/> + </exec> + </target> </configuration> </execution> <execution> - <id>ambari-web unit tests</id> + <id>test</id> <phase>test</phase> <goals> - <goal>exec</goal> + <goal>run</goal> </goals> <configuration> - <skip>${skipTests}</skip> - <executable>${executable.npm}</executable> - <workingDirectory>${basedir}</workingDirectory> - <commandlineArgs>${args.npm} test</commandlineArgs> + <target name="ambari-web unit tests" unless="${skipTests}"> + <exec dir="${basedir}" executable="${executable.npm}" failonerror="true"> + <arg value="${args.npm.test}"/> + </exec> + </target> </configuration> </execution> <execution> <id>gzip ambari-web content</id> <phase>prepare-package</phase> <goals> - <goal>exec</goal> + <goal>run</goal> </goals> <configuration> - <executable>${executable.gzip}</executable> - <workingDirectory>${basedir}</workingDirectory> - <arguments> - <argument>-f</argument> - <argument>public/javascripts/app.js</argument> - <argument>public/javascripts/vendor.js</argument> - <argument>public/stylesheets/app.css</argument> - </arguments> + <target name="ambari-web-package"> + <exec dir="${basedir}" executable="${executable.gzip}" failonerror="true"> + <arg value="-f"/> + <arg value="public/javascripts/app.js"/> + <arg value="public/javascripts/vendor.js"/> + <arg value="public/stylesheets/app.css"/> + </exec> + </target> </configuration> </execution> </executions> @@ -270,17 +230,17 @@ <envClassifier>win</envClassifier> <dirsep>\</dirsep> <executable.brunch>cmd</executable.brunch> - <args.brunch>/C brunch</args.brunch> + <args.brunch.build>/C brunch build</args.brunch.build> <executable.gzip>gzip</executable.gzip> <executable.mkdir>cmd</executable.mkdir> - <args.mkdir>/C mkdir</args.mkdir> + <args.mkdir.clean>/C mkdir public</args.mkdir.clean> <executable.npm>cmd</executable.npm> - <args.npm>/C npm</args.npm> + <args.npm.install>/C npm install</args.npm.install> + <args.npm.test>/C npm test</args.npm.test> <executable.rmdir>cmd</executable.rmdir> <args.rm.clean>/C rmdir /S /Q</args.rm.clean> <executable.shell>cmd</executable.shell> <fileextension.shell>cmd</fileextension.shell> - <args.shell>/C</args.shell> </properties> </profile> <profile> @@ -294,17 +254,17 @@ <envClassifier>linux</envClassifier> <dirsep>/</dirsep> <executable.brunch>brunch</executable.brunch> - <args.brunch></args.brunch> + <args.brunch.build>build</args.brunch.build> <executable.gzip>gzip</executable.gzip> <executable.mkdir>mkdir</executable.mkdir> - <args.mkdir></args.mkdir> + <args.mkdir.clean>public</args.mkdir.clean> <executable.npm>npm</executable.npm> - <args.npm></args.npm> + <args.npm.install>install</args.npm.install> + <args.npm.test>test</args.npm.test> <executable.rmdir>rm</executable.rmdir> <args.rm.clean>-rf</args.rm.clean> <executable.shell>sh</executable.shell> <fileextension.shell>sh</fileextension.shell> - <args.shell></args.shell> </properties> </profile> </profiles> http://git-wip-us.apache.org/repos/asf/ambari/blob/c37394ad/ambari-web/set-ambari-version.cmd ---------------------------------------------------------------------- diff --git a/ambari-web/set-ambari-version.cmd b/ambari-web/set-ambari-version.cmd deleted file mode 100644 index 14fdec6..0000000 --- a/ambari-web/set-ambari-version.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@echo off -rem Licensed to the Apache Software Foundation (ASF) under one or more -rem contributor license agreements. See the NOTICE file distributed with -rem this work for additional information regarding copyright ownership. -rem The ASF licenses this file to You under the Apache License, Version 2.0 -rem (the "License"); you may not use this file except in compliance with -rem the License. You may obtain a copy of the License at -rem -rem http://www.apache.org/licenses/LICENSE-2.0 -rem -rem Unless required by applicable law or agreed to in writing, software -rem distributed under the License is distributed on an "AS IS" BASIS, -rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -rem See the License for the specific language governing permissions and -rem limitations under the License. - -powershell -File set-ambari-version.ps1 %* \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/c37394ad/ambari-web/set-ambari-version.ps1 ---------------------------------------------------------------------- diff --git a/ambari-web/set-ambari-version.ps1 b/ambari-web/set-ambari-version.ps1 deleted file mode 100644 index a69df44..0000000 --- a/ambari-web/set-ambari-version.ps1 +++ /dev/null @@ -1,27 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -$newVersion = $($args[0]) - -if ($newVersion -ne '${ambariVersion}') -{ - "Setting Ambari version to $newVersion" - Get-Content public/javascripts/app.js -ReadCount 1000 | %{$_ -replace "App.version.*=.*;","App.version = '$newVersion';"} | Set-Content public/javascripts/tmp.js - Move-Item ./public/javascripts/tmp.js ./public/javascripts/app.js -force -} http://git-wip-us.apache.org/repos/asf/ambari/blob/c37394ad/ambari-web/set-default-stack-version.cmd ---------------------------------------------------------------------- diff --git a/ambari-web/set-default-stack-version.cmd b/ambari-web/set-default-stack-version.cmd deleted file mode 100644 index e724e1f..0000000 --- a/ambari-web/set-default-stack-version.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@echo off -rem Licensed to the Apache Software Foundation (ASF) under one or more -rem contributor license agreements. See the NOTICE file distributed with -rem this work for additional information regarding copyright ownership. -rem The ASF licenses this file to You under the Apache License, Version 2.0 -rem (the "License"); you may not use this file except in compliance with -rem the License. You may obtain a copy of the License at -rem -rem http://www.apache.org/licenses/LICENSE-2.0 -rem -rem Unless required by applicable law or agreed to in writing, software -rem distributed under the License is distributed on an "AS IS" BASIS, -rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -rem See the License for the specific language governing permissions and -rem limitations under the License. - -powershell -File set-default-stack-version.ps1 %* \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/c37394ad/ambari-web/set-default-stack-version.ps1 ---------------------------------------------------------------------- diff --git a/ambari-web/set-default-stack-version.ps1 b/ambari-web/set-default-stack-version.ps1 deleted file mode 100644 index 0528158..0000000 --- a/ambari-web/set-default-stack-version.ps1 +++ /dev/null @@ -1,35 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -$newVersion = $($args[0]) - -if ($newVersion -ne '${defaultStackVersion}') -{ - $separator = "-" - $option = [System.StringSplitOptions]::RemoveEmptyEntries - $newStackParts = $newVersion.Split($separator, $option) - - $newStackVersion = $($newStackParts[0]) + "-" + $($newStackParts[1]) - $newLocalStackVersion = $($newStackParts[0]) + "Local-" + $($newStackParts[1]) - "Setting default stack to '$($newStackParts[0])' and version to '$($newStackParts[1])'" - Get-Content public/javascripts/app.js -ReadCount 1000 | %{$_ -replace "App.defaultStackVersion.*=.*;","App.defaultStackVersion = '$newStackVersion';"} | Set-Content public/javascripts/tmp.js - Move-Item ./public/javascripts/tmp.js ./public/javascripts/app.js -force - Get-Content public/javascripts/app.js -ReadCount 1000 | %{$_ -replace "App.defaultLocalStackVersion.*=.*;","App.defaultLocalStackVersion = '$newLocalStackVersion';"} | Set-Content public/javascripts/tmp.js - Move-Item ./public/javascripts/tmp.js ./public/javascripts/app.js -force -} http://git-wip-us.apache.org/repos/asf/ambari/blob/c37394ad/ambari-web/toggle-experimental.cmd ---------------------------------------------------------------------- diff --git a/ambari-web/toggle-experimental.cmd b/ambari-web/toggle-experimental.cmd deleted file mode 100644 index 9552279..0000000 --- a/ambari-web/toggle-experimental.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@echo off -rem Licensed to the Apache Software Foundation (ASF) under one or more -rem contributor license agreements. See the NOTICE file distributed with -rem this work for additional information regarding copyright ownership. -rem The ASF licenses this file to You under the Apache License, Version 2.0 -rem (the "License"); you may not use this file except in compliance with -rem the License. You may obtain a copy of the License at -rem -rem http://www.apache.org/licenses/LICENSE-2.0 -rem -rem Unless required by applicable law or agreed to in writing, software -rem distributed under the License is distributed on an "AS IS" BASIS, -rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -rem See the License for the specific language governing permissions and -rem limitations under the License. - -powershell -File toggle-experimental.ps1 %* \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/c37394ad/ambari-web/toggle-experimental.ps1 ---------------------------------------------------------------------- diff --git a/ambari-web/toggle-experimental.ps1 b/ambari-web/toggle-experimental.ps1 deleted file mode 100644 index 03c51ba..0000000 --- a/ambari-web/toggle-experimental.ps1 +++ /dev/null @@ -1,27 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -$enable = $($args[0]) - -if ($enable -eq 'true') -{ - echo 'Enabling experimental features...' - Get-Content public/javascripts/app.js -ReadCount 1000 | %{$_ -replace "App.enableExperimental.*=.*;","App.enableExperimental = true;"} | Set-Content public/javascripts/tmp.js - Move-Item ./public/javascripts/tmp.js ./public/javascripts/app.js -force -} http://git-wip-us.apache.org/repos/asf/ambari/blob/c37394ad/contrib/views/slider/pom.xml ---------------------------------------------------------------------- diff --git a/contrib/views/slider/pom.xml b/contrib/views/slider/pom.xml index 71a7a06..cf5c0c5 100644 --- a/contrib/views/slider/pom.xml +++ b/contrib/views/slider/pom.xml @@ -141,105 +141,62 @@ <build> <plugins> <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>exec-maven-plugin</artifactId> - <version>1.2.1</version> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + <version>1.7</version> <executions> <execution> - <id>clean-rmdir</id> - <phase>clean</phase> - <goals> - <goal>exec</goal> - </goals> - <configuration> - <executable>${executable.rmdir}</executable> - <workingDirectory>${basedir}</workingDirectory> - <commandlineArgs>${args.rm.clean} public node_modules</commandlineArgs> - <successCodes> - <successCode>0</successCode> - <successCode>1</successCode> - <successCode>2</successCode> - </successCodes> - </configuration> - </execution> - <execution> - <id>clean-mkdir</id> + <id>clean</id> <phase>clean</phase> <goals> - <goal>exec</goal> + <goal>run</goal> </goals> <configuration> - <executable>${executable.mkdir}</executable> - <workingDirectory>${basedir}</workingDirectory> - <commandlineArgs>${args.mkdir} public</commandlineArgs> + <target name="slider-ui-clean"> + <exec dir="${ui.directory}" executable="${executable.rmdir}"> + <arg value="${args.rm.clean}"/> + <arg value="public"/> + <arg value="node_modules"/> + </exec> + <exec dir="${ui.directory}" executable="${executable.mkdir}"> + <arg value="${args.mkdir.clean}"/> + </exec> + </target> </configuration> </execution> <execution> - <id>slider-ui-compile-npm</id> + <id>compile</id> <phase>generate-resources</phase> <goals> - <goal>exec</goal> - </goals> - <configuration> - <executable>${executable.npm}</executable> - <workingDirectory>${basedir}</workingDirectory> - <commandlineArgs>${args.npm} install</commandlineArgs> - </configuration> - </execution> - <execution> - <id>slider-ui-compile-brunch</id> - <phase>compile</phase> - <goals> - <goal>exec</goal> + <goal>run</goal> </goals> <configuration> - <executable>${executable.brunch}</executable> - <workingDirectory>${basedir}</workingDirectory> - <commandlineArgs>${args.brunch} build</commandlineArgs> + <target name="slider-ui-compile"> + <exec dir="${ui.directory}" executable="${executable.npm}" failonerror="true"> + <arg value="${args.npm.install}"/> + </exec> + <exec dir="${ui.directory}" executable="${executable.brunch}" failonerror="true"> + <arg value="${args.brunch.build}"/> + </exec> + </target> </configuration> </execution> <execution> - <id>slider-ui-test</id> + <id>test</id> <phase>test</phase> <goals> - <goal>exec</goal> + <goal>run</goal> </goals> <configuration> - <skip>${skipTests}</skip> - <executable>${executable.npm}</executable> - <workingDirectory>${ui.directory}</workingDirectory> - <commandlineArgs>${args.npm} test</commandlineArgs> - <environmentVariables> - <PYTHON>${executable.python}</PYTHON> - </environmentVariables> + <target name="slider-ui-test" unless="${skipTests}"> + <exec dir="${ui.directory}" executable="${executable.npm}" failonerror="true"> + <env key="PYTHON" value="${basedir}/../ambari-common/src/main/unix/ambari-python-wrap"/> + <arg value="${args.npm.test}"/> + </exec> + </target> </configuration> </execution> <execution> - <id>gzip ambari-web content</id> - <phase>prepare-package</phase> - <goals> - <goal>exec</goal> - </goals> - <configuration> - <executable>${executable.gzip}</executable> - <workingDirectory>${basedir}</workingDirectory> - <arguments> - <argument>-f</argument> - <argument>public/javascripts/app.js</argument> - <argument>public/javascripts/vendor.js</argument> - <argument>public/stylesheets/app.css</argument> - </arguments> - </configuration> - </execution> - </executions> - </plugin> -<!-- - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-antrun-plugin</artifactId> - <version>1.7</version> - <executions> - <execution> <id>prepare-package</id> <phase>prepare-package</phase> <goals> @@ -247,14 +204,20 @@ </goals> <configuration> <target name="slider-ui-prepare-package"> - <copy toDir="${project.build.directory}/ambari-server-${project.version}-dist/ambari-server-${project.version}/web/"> - <fileset dir="${ui.directory}/../ambari-web/public"/> </copy> + <exec dir="${ui.directory}" executable="${executable.gzip}" failonerror="false"> + <arg value="-f"/> + <arg value="public/javascripts/app.js"/> + <arg value="public/javascripts/vendor.js"/> + <arg value="public/stylesheets/app.css"/> + </exec> + + <!-- <copy toDir="${project.build.directory}/ambari-server-${project.version}-dist/ambari-server-${project.version}/web/"> + <fileset dir="${ui.directory}/../ambari-web/public"/> </copy> --> </target> </configuration> </execution> </executions> </plugin> ---> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> @@ -385,14 +348,14 @@ <properties> <envClassifier>win</envClassifier> <dirsep>\</dirsep> - <executable.python>${project.basedir}/../ambari-common/src/main/unix/ambari-python-wrap</executable.python> <executable.brunch>cmd</executable.brunch> - <args.brunch>/C brunch</args.brunch> + <args.brunch.build>/C brunch build</args.brunch.build> <executable.gzip>gzip</executable.gzip> <executable.mkdir>cmd</executable.mkdir> <args.mkdir.clean>/C mkdir public</args.mkdir.clean> <executable.npm>cmd</executable.npm> - <args.npm>/C npm</args.npm> + <args.npm.install>/C npm install</args.npm.install> + <args.npm.test>/C npm test</args.npm.test> <executable.rmdir>cmd</executable.rmdir> <args.rm.clean>/C rmdir /S /Q</args.rm.clean> <executable.shell>cmd</executable.shell> @@ -409,14 +372,14 @@ <properties> <envClassifier>linux</envClassifier> <dirsep>/</dirsep> - <executable.python>python</executable.python> <executable.brunch>brunch</executable.brunch> - <args.brunch></args.brunch> + <args.brunch.build>build</args.brunch.build> <executable.gzip>gzip</executable.gzip> <executable.mkdir>mkdir</executable.mkdir> <args.mkdir.clean>public</args.mkdir.clean> <executable.npm>npm</executable.npm> - <args.npm></args.npm> + <args.npm.install>install</args.npm.install> + <args.npm.test>test</args.npm.test> <executable.rmdir>rm</executable.rmdir> <args.rm.clean>-rf</args.rm.clean> <executable.shell>sh</executable.shell>
