summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Barca <fbarca@hortonworks.com>2015-03-31 14:08:35 -0700
committerFlorian Barca <fbarca@hortonworks.com>2015-03-31 14:08:35 -0700
commitf72e0bdb1df87242a144fbd43cef462c17f73de1 (patch)
treee61bb9d5343cc9b92f58d84e47dbc8503ff0ef2c
parentde97e38cd747ab25793531a3d8a508f08d027867 (diff)
AMBARI-10243 [WinTP2] ambari-web build is incomplete
Replaced maven-antrun-plugin with exec-maven-plugin. Upgraded to v1.2.1 was necessary because v1.2 doesn't process the <successCodes> tag. Created Windows scripts with identical functionality for set-ambari-version.sh, set-default-stack-version.sh and toggle-experimental.sh. Fixed slider view build.
-rw-r--r--ambari-agent/pom.xml4
-rw-r--r--ambari-client/python-client/pom.xml2
-rw-r--r--ambari-metrics/ambari-metrics-assembly/pom.xml2
-rw-r--r--ambari-server/pom.xml4
-rw-r--r--ambari-shell/ambari-python-shell/pom.xml2
-rw-r--r--ambari-web/pom.xml168
-rw-r--r--ambari-web/set-ambari-version.cmd17
-rw-r--r--ambari-web/set-ambari-version.ps127
-rw-r--r--ambari-web/set-default-stack-version.cmd17
-rw-r--r--ambari-web/set-default-stack-version.ps135
-rw-r--r--ambari-web/toggle-experimental.cmd17
-rw-r--r--ambari-web/toggle-experimental.ps127
-rw-r--r--contrib/views/slider/pom.xml137
13 files changed, 338 insertions, 121 deletions
diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml
index 110a8d57cd..447601100c 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</version>
+ <version>1.2.1</version>
<executions>
<execution>
<configuration>
@@ -799,7 +799,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
- <version>1.2</version>
+ <version>1.2.1</version>
<executions>
<execution>
<id>run-heat</id>
diff --git a/ambari-client/python-client/pom.xml b/ambari-client/python-client/pom.xml
index 3c957eec60..73a6825afa 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</version>
+ <version>1.2.1</version>
<executions>
<execution>
<configuration>
diff --git a/ambari-metrics/ambari-metrics-assembly/pom.xml b/ambari-metrics/ambari-metrics-assembly/pom.xml
index cf7a92deac..296d399090 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</version>
+ <version>1.2.1</version>
<executions>
<execution>
<id>run-heat-collector</id>
diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml
index 18593bd138..1e6be0c817 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</version>
+ <version>1.2.1</version>
<executions>
<execution>
<configuration>
@@ -1358,7 +1358,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
- <version>1.2</version>
+ <version>1.2.1</version>
<executions>
<execution>
<id>run-heat</id>
diff --git a/ambari-shell/ambari-python-shell/pom.xml b/ambari-shell/ambari-python-shell/pom.xml
index d78c6ea978..c4dddf46da 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</version>
+ <version>1.2.1</version>
<executions>
<execution>
<configuration>
diff --git a/ambari-web/pom.xml b/ambari-web/pom.xml
index 0849111c4c..04f9b5d48c 100644
--- a/ambari-web/pom.xml
+++ b/ambari-web/pom.xml
@@ -87,90 +87,130 @@
</configuration>
</plugin>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>1.7</version>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>1.2.1</version>
<executions>
<execution>
- <id>clean</id>
+ <id>clean-rmdir</id>
<phase>clean</phase>
<goals>
- <goal>run</goal>
+ <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>
</goals>
<configuration>
- <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>
+ <!-- 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>
</configuration>
</execution>
<execution>
- <id>compile</id>
+ <id>toggle-experimental</id>
<phase>compile</phase>
<goals>
- <goal>run</goal>
+ <goal>exec</goal>
</goals>
<configuration>
- <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>
+ <!-- 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>
</configuration>
</execution>
<execution>
- <id>test</id>
+ <id>ambari-web unit tests</id>
<phase>test</phase>
<goals>
- <goal>run</goal>
+ <goal>exec</goal>
</goals>
<configuration>
- <target name="ambari-web unit tests" unless="${skipTests}">
- <exec dir="${basedir}" executable="${executable.npm}" failonerror="true">
- <arg value="${args.npm.test}"/>
- </exec>
- </target>
+ <skip>${skipTests}</skip>
+ <executable>${executable.npm}</executable>
+ <workingDirectory>${basedir}</workingDirectory>
+ <commandlineArgs>${args.npm} test</commandlineArgs>
</configuration>
</execution>
<execution>
<id>gzip ambari-web content</id>
<phase>prepare-package</phase>
<goals>
- <goal>run</goal>
+ <goal>exec</goal>
</goals>
<configuration>
- <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>
+ <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>
@@ -230,17 +270,17 @@
<envClassifier>win</envClassifier>
<dirsep>\</dirsep>
<executable.brunch>cmd</executable.brunch>
- <args.brunch.build>/C brunch build</args.brunch.build>
+ <args.brunch>/C brunch</args.brunch>
<executable.gzip>gzip</executable.gzip>
<executable.mkdir>cmd</executable.mkdir>
- <args.mkdir.clean>/C mkdir public</args.mkdir.clean>
+ <args.mkdir>/C mkdir</args.mkdir>
<executable.npm>cmd</executable.npm>
- <args.npm.install>/C npm install</args.npm.install>
- <args.npm.test>/C npm test</args.npm.test>
+ <args.npm>/C npm</args.npm>
<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>
@@ -254,17 +294,17 @@
<envClassifier>linux</envClassifier>
<dirsep>/</dirsep>
<executable.brunch>brunch</executable.brunch>
- <args.brunch.build>build</args.brunch.build>
+ <args.brunch></args.brunch>
<executable.gzip>gzip</executable.gzip>
<executable.mkdir>mkdir</executable.mkdir>
- <args.mkdir.clean>public</args.mkdir.clean>
+ <args.mkdir></args.mkdir>
<executable.npm>npm</executable.npm>
- <args.npm.install>install</args.npm.install>
- <args.npm.test>test</args.npm.test>
+ <args.npm></args.npm>
<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>
diff --git a/ambari-web/set-ambari-version.cmd b/ambari-web/set-ambari-version.cmd
new file mode 100644
index 0000000000..14fdec64c8
--- /dev/null
+++ b/ambari-web/set-ambari-version.cmd
@@ -0,0 +1,17 @@
+@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
diff --git a/ambari-web/set-ambari-version.ps1 b/ambari-web/set-ambari-version.ps1
new file mode 100644
index 0000000000..a69df44c64
--- /dev/null
+++ b/ambari-web/set-ambari-version.ps1
@@ -0,0 +1,27 @@
+#
+# 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
+}
diff --git a/ambari-web/set-default-stack-version.cmd b/ambari-web/set-default-stack-version.cmd
new file mode 100644
index 0000000000..e724e1fbb8
--- /dev/null
+++ b/ambari-web/set-default-stack-version.cmd
@@ -0,0 +1,17 @@
+@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
diff --git a/ambari-web/set-default-stack-version.ps1 b/ambari-web/set-default-stack-version.ps1
new file mode 100644
index 0000000000..0528158562
--- /dev/null
+++ b/ambari-web/set-default-stack-version.ps1
@@ -0,0 +1,35 @@
+#
+# 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
+}
diff --git a/ambari-web/toggle-experimental.cmd b/ambari-web/toggle-experimental.cmd
new file mode 100644
index 0000000000..9552279055
--- /dev/null
+++ b/ambari-web/toggle-experimental.cmd
@@ -0,0 +1,17 @@
+@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
diff --git a/ambari-web/toggle-experimental.ps1 b/ambari-web/toggle-experimental.ps1
new file mode 100644
index 0000000000..03c51bad3f
--- /dev/null
+++ b/ambari-web/toggle-experimental.ps1
@@ -0,0 +1,27 @@
+#
+# 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
+}
diff --git a/contrib/views/slider/pom.xml b/contrib/views/slider/pom.xml
index cf5c0c5cbc..8c1e1b75a4 100644
--- a/contrib/views/slider/pom.xml
+++ b/contrib/views/slider/pom.xml
@@ -141,62 +141,105 @@
<build>
<plugins>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>1.7</version>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>1.2.1</version>
<executions>
<execution>
- <id>clean</id>
+ <id>clean-rmdir</id>
<phase>clean</phase>
<goals>
- <goal>run</goal>
+ <goal>exec</goal>
</goals>
<configuration>
- <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>
+ <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</id>
+ <id>slider-ui-compile-npm</id>
<phase>generate-resources</phase>
<goals>
- <goal>run</goal>
+ <goal>exec</goal>
</goals>
<configuration>
- <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>
+ <executable>${executable.npm}</executable>
+ <workingDirectory>${ui.directory}</workingDirectory>
+ <commandlineArgs>${args.npm} install</commandlineArgs>
+ </configuration>
+ </execution>
+ <execution>
+ <id>slider-ui-compile-brunch</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <executable>${executable.brunch}</executable>
+ <workingDirectory>${ui.directory}</workingDirectory>
+ <commandlineArgs>${args.brunch} build</commandlineArgs>
</configuration>
</execution>
<execution>
- <id>test</id>
+ <id>slider-ui-test</id>
<phase>test</phase>
<goals>
- <goal>run</goal>
+ <goal>exec</goal>
</goals>
<configuration>
- <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>
+ <skip>${skipTests}</skip>
+ <executable>${executable.npm}</executable>
+ <workingDirectory>${ui.directory}</workingDirectory>
+ <commandlineArgs>${args.npm} test</commandlineArgs>
+ <environmentVariables>
+ <PYTHON>${executable.python}</PYTHON>
+ </environmentVariables>
</configuration>
</execution>
<execution>
+ <id>gzip ambari-web content</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <executable>${executable.gzip}</executable>
+ <workingDirectory>${ui.directory}</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>
@@ -204,20 +247,14 @@
</goals>
<configuration>
<target name="slider-ui-prepare-package">
- <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> -->
+ <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>
@@ -348,14 +385,14 @@
<properties>
<envClassifier>win</envClassifier>
<dirsep>\</dirsep>
+ <executable.python>python</executable.python>
<executable.brunch>cmd</executable.brunch>
- <args.brunch.build>/C brunch build</args.brunch.build>
+ <args.brunch>/C brunch</args.brunch>
<executable.gzip>gzip</executable.gzip>
<executable.mkdir>cmd</executable.mkdir>
- <args.mkdir.clean>/C mkdir public</args.mkdir.clean>
+ <args.mkdir>/C mkdir</args.mkdir>
<executable.npm>cmd</executable.npm>
- <args.npm.install>/C npm install</args.npm.install>
- <args.npm.test>/C npm test</args.npm.test>
+ <args.npm>/C npm</args.npm>
<executable.rmdir>cmd</executable.rmdir>
<args.rm.clean>/C rmdir /S /Q</args.rm.clean>
<executable.shell>cmd</executable.shell>
@@ -372,14 +409,14 @@
<properties>
<envClassifier>linux</envClassifier>
<dirsep>/</dirsep>
+ <executable.python>${project.basedir}/../ambari-common/src/main/unix/ambari-python-wrap</executable.python>
<executable.brunch>brunch</executable.brunch>
- <args.brunch.build>build</args.brunch.build>
+ <args.brunch></args.brunch>
<executable.gzip>gzip</executable.gzip>
<executable.mkdir>mkdir</executable.mkdir>
- <args.mkdir.clean>public</args.mkdir.clean>
+ <args.mkdir></args.mkdir>
<executable.npm>npm</executable.npm>
- <args.npm.install>install</args.npm.install>
- <args.npm.test>test</args.npm.test>
+ <args.npm></args.npm>
<executable.rmdir>rm</executable.rmdir>
<args.rm.clean>-rf</args.rm.clean>
<executable.shell>sh</executable.shell>