Browse Source

Revert "AMBARI-10303. Install node / brunch and other build dependencies at build time (alexantonenko)"

This reverts commit 7450f4e17c5d29bd401a9fbd938380b8033e9e99.
Yusaku Sako 10 years ago
parent
commit
3c6647e09a
2 changed files with 19 additions and 65 deletions
  1. 17 61
      ambari-web/pom.xml
  2. 2 4
      pom.xml

+ 17 - 61
ambari-web/pom.xml

@@ -86,27 +86,6 @@
           <mappings/>
         </configuration>
       </plugin>
-      <plugin>
-        <groupId>com.github.eirslett</groupId>
-        <artifactId>frontend-maven-plugin</artifactId>
-        <version>0.0.19</version>
-        <configuration>
-          <nodeVersion>v0.10.31</nodeVersion>
-          <npmVersion>1.4.28</npmVersion>
-        </configuration>
-        <executions>
-          <execution>
-            <id>install node and npm</id>
-            <goals>
-              <goal>install-node-and-npm</goal>
-            </goals>
-            <configuration>
-              <nodeVersion>v0.10.31</nodeVersion>
-              <npmVersion>1.4.28</npmVersion>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>exec-maven-plugin</artifactId>
@@ -121,7 +100,7 @@
             <configuration>
               <executable>${executable.rmdir}</executable>
               <workingDirectory>${basedir}</workingDirectory>
-              <commandlineArgs>${args.rm.clean} public node_modules node</commandlineArgs>
+              <commandlineArgs>${args.rm.clean} public node_modules</commandlineArgs>
               <successCodes>
                 <successCode>0</successCode>
                 <successCode>1</successCode>
@@ -138,43 +117,19 @@
             <configuration>
               <executable>${executable.mkdir}</executable>
               <workingDirectory>${basedir}</workingDirectory>
-              <commandlineArgs>${args.mkdir} public node</commandlineArgs>
-            </configuration>
-          </execution>
-          <execution>
-            <id>npm-cache-clean</id>
-            <phase>compile</phase>
-            <goals>
-              <goal>exec</goal>
-            </goals>
-            <configuration>
-              <executable>${executable.node}</executable>
-              <workingDirectory>${basedir}</workingDirectory>
-              <commandlineArgs>${args.npm.full.path} cache clean</commandlineArgs>
-            </configuration>
-          </execution>
-          <execution>
-            <id>install-npm</id>
-            <phase>compile</phase>
-            <goals>
-              <goal>exec</goal>
-            </goals>
-            <configuration>
-              <executable>${executable.node}</executable>
-              <workingDirectory>${basedir}</workingDirectory>
-              <commandlineArgs>${args.npm.full.path} install</commandlineArgs>
+              <commandlineArgs>${args.mkdir} public</commandlineArgs>
             </configuration>
           </execution>
           <execution>
-            <id>install-brunch</id>
+            <id>compile-npm</id>
             <phase>compile</phase>
             <goals>
               <goal>exec</goal>
             </goals>
             <configuration>
-              <executable>${executable.node}</executable>
+              <executable>${executable.npm}</executable>
               <workingDirectory>${basedir}</workingDirectory>
-              <commandlineArgs>${args.npm.full.path} install brunch@v1.7.20</commandlineArgs>
+              <commandlineArgs>${args.npm} install</commandlineArgs>
             </configuration>
           </execution>
           <execution>
@@ -184,9 +139,9 @@
               <goal>exec</goal>
             </goals>
             <configuration>
-              <executable>${executable.node}</executable>
+              <executable>${executable.brunch}</executable>
               <workingDirectory>${basedir}</workingDirectory>
-              <commandlineArgs>${args.brunch.full.path} build</commandlineArgs>
+              <commandlineArgs>${args.brunch} build</commandlineArgs>
             </configuration>
           </execution>
           <execution>
@@ -236,9 +191,9 @@
             </goals>
             <configuration>
               <skip>${skipTests}</skip>
-              <executable>${executable.node}</executable>
+              <executable>${executable.npm}</executable>
               <workingDirectory>${basedir}</workingDirectory>
-              <commandlineArgs>${args.npm.full.path} test</commandlineArgs>
+              <commandlineArgs>${args.npm} test</commandlineArgs>
             </configuration>
           </execution>
           <execution>
@@ -272,7 +227,6 @@
             <exclude>app/assets/**</exclude>
             <exclude>vendor/**</exclude>
             <exclude>node_modules/**</exclude>
-            <exclude>node/**</exclude>
             <exclude>npm-debug.log</exclude>
           </excludes>
         </configuration>
@@ -315,17 +269,18 @@
       <properties>
         <envClassifier>win</envClassifier>
         <dirsep>\</dirsep>
+        <executable.brunch>cmd</executable.brunch>
+        <args.brunch>/C brunch</args.brunch>
         <executable.gzip>gzip</executable.gzip>
         <executable.mkdir>cmd</executable.mkdir>
         <args.mkdir>/C mkdir</args.mkdir>
+        <executable.npm>cmd</executable.npm>
+        <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>
-        <executable.node>node.exe</executable.node>
-        <args.npm.full.path>node/npm/bin/npm-cli.js</args.npm.full.path>
-        <args.brunch.full.path>node_modules/brunch/bin/brunch</args.brunch.full.path>
       </properties>
     </profile>
     <profile>
@@ -338,17 +293,18 @@
       <properties>
         <envClassifier>linux</envClassifier>
         <dirsep>/</dirsep>
+        <executable.brunch>brunch</executable.brunch>
+        <args.brunch></args.brunch>
         <executable.gzip>gzip</executable.gzip>
         <executable.mkdir>mkdir</executable.mkdir>
         <args.mkdir></args.mkdir>
+        <executable.npm>npm</executable.npm>
+        <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>
-        <executable.node>node/node</executable.node>
-        <args.npm.full.path>node/npm/bin/npm-cli.js</args.npm.full.path>
-        <args.brunch.full.path>node_modules/brunch/bin/brunch</args.brunch.full.path>
       </properties>
     </profile>
   </profiles>

+ 2 - 4
pom.xml

@@ -283,16 +283,14 @@
             <exclude>.hgignore</exclude>
             <exclude>.hgtags</exclude>
 
-            <!-- Nodejs and npm -->
-            <exclude>ambari-web/node_modules/**</exclude>
-            <exclude>ambari-web/node/**</exclude>
-
             <!--Python Mock library (BSD license)-->
             <exclude>ambari-common/src/test/python/mock/**</exclude>
             <!--Jinja2 library (BSD license)-->
             <exclude>ambari-common/src/main/python/ambari_jinja2/**</exclude>
             <exclude>ambari-common/src/main/python/jinja2/**</exclude>
 
+            <exclude>ambari-web/node_modules/**</exclude>
+
             <!--Contributions-->
             <exclude>contrib/ambari-scom/management-pack/Hadoop_MP/**</exclude>
             <exclude>contrib/addons/test/dataServices/jmx/data/cluster_configuration.json.nohbase</exclude>