ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fba...@apache.org
Subject ambari git commit: AMBARI-10243 [WinTP2] ambari-web build is incomplete
Date Mon, 30 Mar 2015 23:02:45 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 6af1c2cb0 -> 9a1b0eb4e


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.


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9a1b0eb4
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9a1b0eb4
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9a1b0eb4

Branch: refs/heads/trunk
Commit: 9a1b0eb4ec0b54381aa5987574bd98cae1c4ee76
Parents: 6af1c2c
Author: Florian Barca <fbarca@hortonworks.com>
Authored: Mon Mar 30 16:02:34 2015 -0700
Committer: Florian Barca <fbarca@hortonworks.com>
Committed: Mon Mar 30 16:02:34 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, 336 insertions(+), 119 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/9a1b0eb4/ambari-agent/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml
index 110a8d5..4476011 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>

http://git-wip-us.apache.org/repos/asf/ambari/blob/9a1b0eb4/ambari-client/python-client/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-client/python-client/pom.xml b/ambari-client/python-client/pom.xml
index 3c957ee..73a6825 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>

http://git-wip-us.apache.org/repos/asf/ambari/blob/9a1b0eb4/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 cf7a92d..296d399 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>

http://git-wip-us.apache.org/repos/asf/ambari/blob/9a1b0eb4/ambari-server/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml
index 18593bd..1e6be0c 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>

http://git-wip-us.apache.org/repos/asf/ambari/blob/9a1b0eb4/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 d78c6ea..c4dddf4 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>

http://git-wip-us.apache.org/repos/asf/ambari/blob/9a1b0eb4/ambari-web/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-web/pom.xml b/ambari-web/pom.xml
index 0849111..04f9b5d 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>

http://git-wip-us.apache.org/repos/asf/ambari/blob/9a1b0eb4/ambari-web/set-ambari-version.cmd
----------------------------------------------------------------------
diff --git a/ambari-web/set-ambari-version.cmd b/ambari-web/set-ambari-version.cmd
new file mode 100644
index 0000000..14fdec6
--- /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

http://git-wip-us.apache.org/repos/asf/ambari/blob/9a1b0eb4/ambari-web/set-ambari-version.ps1
----------------------------------------------------------------------
diff --git a/ambari-web/set-ambari-version.ps1 b/ambari-web/set-ambari-version.ps1
new file mode 100644
index 0000000..a69df44
--- /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
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/9a1b0eb4/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
new file mode 100644
index 0000000..e724e1f
--- /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

http://git-wip-us.apache.org/repos/asf/ambari/blob/9a1b0eb4/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
new file mode 100644
index 0000000..0528158
--- /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
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/9a1b0eb4/ambari-web/toggle-experimental.cmd
----------------------------------------------------------------------
diff --git a/ambari-web/toggle-experimental.cmd b/ambari-web/toggle-experimental.cmd
new file mode 100644
index 0000000..9552279
--- /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

http://git-wip-us.apache.org/repos/asf/ambari/blob/9a1b0eb4/ambari-web/toggle-experimental.ps1
----------------------------------------------------------------------
diff --git a/ambari-web/toggle-experimental.ps1 b/ambari-web/toggle-experimental.ps1
new file mode 100644
index 0000000..03c51ba
--- /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
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/9a1b0eb4/contrib/views/slider/pom.xml
----------------------------------------------------------------------
diff --git a/contrib/views/slider/pom.xml b/contrib/views/slider/pom.xml
index cf5c0c5..71a7a06 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>${basedir}</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>${basedir}</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>${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>
@@ -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>${project.basedir}/../ambari-common/src/main/unix/ambari-python-wrap</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>
         <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>python</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>
         <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>


Mime
View raw message