atlas-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From venkat...@apache.org
Subject [02/11] incubator-atlas git commit: ATLAS-90 Support offline builds. Contributed by Vishal Kadam
Date Fri, 11 Sep 2015 22:52:39 GMT
ATLAS-90 Support offline builds. Contributed by Vishal Kadam


Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/fd4ff8ec
Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/fd4ff8ec
Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/fd4ff8ec

Branch: refs/heads/master
Commit: fd4ff8eca8e37a5d19fbf67ccb2f71ce5339b6f6
Parents: e4c5648
Author: Venkatesh Seetharam <venkatesh@apache.org>
Authored: Fri Sep 11 14:51:57 2015 -0700
Committer: Venkatesh Seetharam <venkatesh@apache.org>
Committed: Fri Sep 11 14:51:57 2015 -0700

----------------------------------------------------------------------
 dashboard/v2/.bowerrc     |   2 +-
 dashboard/v2/gruntfile.js |  27 ++++---
 dashboard/v2/package.json |   3 -
 pom.xml                   |  37 +++++++---
 release-log.txt           |   1 +
 webapp/pom.xml            | 162 ++++++++++++++++++++++++++++++-----------
 6 files changed, 165 insertions(+), 67 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/fd4ff8ec/dashboard/v2/.bowerrc
----------------------------------------------------------------------
diff --git a/dashboard/v2/.bowerrc b/dashboard/v2/.bowerrc
index b5ca2b8..b4d0ffc 100755
--- a/dashboard/v2/.bowerrc
+++ b/dashboard/v2/.bowerrc
@@ -1,5 +1,5 @@
 {
-  "directory": "dist/lib",
+  "directory": "../../webapp/target/dist/lib/",
   "storage": {
           "packages": ".bower-cache",
           "registry": ".bower-registry"

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/fd4ff8ec/dashboard/v2/gruntfile.js
----------------------------------------------------------------------
diff --git a/dashboard/v2/gruntfile.js b/dashboard/v2/gruntfile.js
index 9535c7a..3302913 100755
--- a/dashboard/v2/gruntfile.js
+++ b/dashboard/v2/gruntfile.js
@@ -23,7 +23,8 @@ var git = require('git-rev');
 module.exports = function(grunt) {
     var classPathSep = (process.platform === "win32") ? ';' : ':',
         gitHash = '',
-        pkg = grunt.file.readJSON('package.json');
+        pkg = grunt.file.readJSON('package.json'),
+        distPath = '../../webapp/target/dist';
 
     grunt.initConfig({
         watch: {
@@ -82,11 +83,12 @@ module.exports = function(grunt) {
         bower: {
             install: {
                 options: {
-                    verbose: true
+                    verbose: true,
+                    targetDir: '.bower-components'
                 }
             }
         },
-        dist: 'dist/js/app.min.js',
+        dist: distPath + '/js/app.min.js',
         modules: grunt.file.expand(
             'public/js/app.js',
             'public/js/routes.js',
@@ -97,8 +99,8 @@ module.exports = function(grunt) {
         shell: {
             min: {
                 command: 'java ' +
-                    '-cp dist/lib/closure-compiler/compiler.jar' + classPathSep +
-                    'dist/lib/ng-closure-runner/ngcompiler.jar ' +
+                    '-cp ' + distPath + '/lib/closure-compiler/compiler.jar' + classPathSep
+
+                    '' + distPath + '/lib/ng-closure-runner/ngcompiler.jar ' +
                     'org.angularjs.closurerunner.NgClosureRunner ' +
                     '--compilation_level SIMPLE_OPTIMIZATIONS ' +
                     //'--formatting PRETTY_PRINT ' +
@@ -131,10 +133,15 @@ module.exports = function(grunt) {
                 expand: true,
                 cwd: 'public/',
                 src: ['**', '!js/**/*.js', '!modules/**/*.js'],
-                dest: 'dist'
+                dest: distPath
+            }
+        },
+        clean: {
+            build :[distPath],
+            options: {
+            	force: true
             }
         },
-        clean: ['public/lib', 'dist'],
         proxit: {
             dev: {
                 options: {
@@ -143,7 +150,7 @@ module.exports = function(grunt) {
                     'hosts': [{
                         'hostnames': ['*'],
                         'routes': {
-                            '/': 'dist',
+                            '/': distPath,
                             '/api': 'http://162.249.6.50:21000/api'
                         }
                     }]
@@ -155,8 +162,8 @@ module.exports = function(grunt) {
     require('load-grunt-tasks')(grunt);
     grunt.registerTask('default', ['devUpdate', 'bower', 'jshint', 'jsbeautifier:default']);
 
-    grunt.registerTask('server', ['jshint', 'build', 'concurrent']);
-    grunt.registerTask('build', ['clean', 'bower', 'copy:dist', 'minify']);
+    grunt.registerTask('server', ['jshint', 'clean', 'bower', 'copy:dist', 'minify', 'concurrent']);
+    grunt.registerTask('build', ['copy:dist', 'minify']);
 
     grunt.registerTask('minify', 'Minify the all js', function() {
         var done = this.async();

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/fd4ff8ec/dashboard/v2/package.json
----------------------------------------------------------------------
diff --git a/dashboard/v2/package.json b/dashboard/v2/package.json
index a81ce2c..3772654 100755
--- a/dashboard/v2/package.json
+++ b/dashboard/v2/package.json
@@ -16,9 +16,6 @@
         "Atlas",
         "HortonWorks"
     ],
-    "scripts": {
-        "postinstall": "node node_modules/bower/bin/bower install"
-    },
     "dependencies": {
         "body-parser": "^1.2.0",
         "bower": "~1.3.1",

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/fd4ff8ec/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 7e3df4d..a18e968 100755
--- a/pom.xml
+++ b/pom.xml
@@ -295,7 +295,7 @@
         <developer>
             <id>ssuresh</id>
             <name>Suresh Srinivas</name>
-            <email> ssuresh@apache.org</email>
+            <email>ssuresh@apache.org</email>
             <timezone>-8</timezone>
             <roles>
                 <role>committer</role>
@@ -306,7 +306,7 @@
         <developer>
             <id>vranganathan</id>
             <name>Venkat Ranganathan</name>
-            <email> vranganathan@apache.org</email>
+            <email>vranganathan@apache.org</email>
             <timezone>-8</timezone>
             <roles>
                 <role>committer</role>
@@ -320,7 +320,7 @@
         <!-- platform encoding override -->
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
-
+        <node.version>v0.10.30</node.version>
         <slf4j.version>1.7.7</slf4j.version>
         <jetty.version>9.2.12.v20150709</jetty.version>
         <jersey.version>1.10</jersey.version>
@@ -1251,6 +1251,15 @@
                 </plugin>
 
                 <plugin>
+                    <groupId>com.github.eirslett</groupId>
+                    <artifactId>frontend-maven-plugin</artifactId>
+                    <version>0.0.23</version>
+                    <configuration>
+                        <workingDirectory>../dashboard/v2/</workingDirectory>
+                    </configuration>
+                </plugin>
+
+                <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-surefire-plugin</artifactId>
                     <version>2.16</version>
@@ -1297,7 +1306,7 @@
                     <artifactId>findbugs-maven-plugin</artifactId>
                     <version>3.0.1</version>
                 </plugin>
-                
+
                 <!-- Source code metrics: mvn javancss:report or mvn site -->
                 <plugin>
                     <groupId>org.codehaus.mojo</groupId>
@@ -1542,12 +1551,20 @@
                         <exclude>**/maven-eclipse.xml</exclude>
                         <exclude>**/.externalToolBuilders/**</exclude>
                         <exclude>**/build.log</exclude>
-                        <exclude>dashboard/**/.bower-*/**</exclude> <!-- temp
libs -->
-                        <exclude>dashboard/v2/.bowerrc</exclude> <!-- json
file -->
-                        <exclude>dashboard/v2/lib/**</exclude>  <!-- temp
libs -->
-                        <exclude>dashboard/v2/node*/**</exclude>  <!-- temp
libs -->
-                        <exclude>dashboard/v2/dist/**</exclude>  <!-- package
-->
-                        <exclude>dashboard/v2/**/*.min.js*</exclude> <!--
minified JS -->
+                        <!-- temp libs -->
+                        <exclude>dashboard/**/.bower-*/**</exclude>
+                        <!-- json file -->
+                        <exclude>dashboard/v2/.bowerrc</exclude>
+                        <!-- temp libs -->
+                        <exclude>dashboard/v2/lib/**</exclude>
+                        <!-- temp libs -->
+                        <exclude>dashboard/v2/node*/**</exclude>
+                        <!-- package -->
+                        <exclude>dashboard/v2/dist/**</exclude>
+                        <!-- lib files -->
+                        <exclude>dashboard/v2/public/lib/**</exclude>
+                        <!-- minified JS -->
+                        <exclude>dashboard/v2/**/*.min.js*</exclude>
                     </excludes>
                 </configuration>
                 <executions>

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/fd4ff8ec/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index 0711f7c..851cbdc 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -8,6 +8,7 @@ ATLAS-54 Rename configs in hive hook (shwethags)
 ATLAS-3 Mixed Index creation fails with Date types (suma.shivaprasad via shwethags)
 
 ALL CHANGES:
+ATLAS-90 Support offline builds (Vishal Kadam via Venkatesh Seetharam)
 ATLAS-154 Update website for 0.5-incubating release (Venkatesh Seetharam)
 ATLAS-153 Build failure - org.glassfish:javax.el (shwethags)
 ATLAS-117 Build fails on the latest commit (dossett@gmail.com via shwethags)

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/fd4ff8ec/webapp/pom.xml
----------------------------------------------------------------------
diff --git a/webapp/pom.xml b/webapp/pom.xml
index e4f355e..6085d68 100755
--- a/webapp/pom.xml
+++ b/webapp/pom.xml
@@ -65,6 +65,124 @@
                 </plugins>
             </build>
         </profile>
+        <profile>
+            <id>install-node</id>
+            <activation>
+                <file>
+                    <missing>../dashboard/v2/node</missing>
+                </file>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>com.github.eirslett</groupId>
+                        <artifactId>frontend-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>install node and npm</id>
+                                <goals>
+                                    <goal>install-node-and-npm</goal>
+                                </goals>
+                                <configuration>
+                                    <nodeVersion>${node.version}</nodeVersion>
+                                    <npmVersion>1.4.3</npmVersion>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <profile>
+            <id>install-node_modules</id>
+            <activation>
+                <file>
+                    <missing>../dashboard/v2/node_modules</missing>
+                </file>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>com.github.eirslett</groupId>
+                        <artifactId>frontend-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>npm install</id>
+                                <goals>
+                                    <goal>npm</goal>
+                                </goals>
+                                <configuration>
+                                    <arguments>install</arguments>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <profile>
+            <id>bower-install</id>
+            <activation>
+                <file>
+                    <missing>target/dist/lib</missing>
+                </file>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>com.github.eirslett</groupId>
+                        <artifactId>frontend-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>install bower</id>
+                                <goals>
+                                    <goal>grunt</goal>
+                                </goals>
+                                <configuration>
+                                    <arguments>bower</arguments>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <profile>
+            <id>grunt-task</id>
+            <activation>
+                <property>
+                    <name>!disableGrunt</name>
+                </property>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>com.github.eirslett</groupId>
+                        <artifactId>frontend-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>npm remaining</id>
+                                <goals>
+                                    <goal>npm</goal>
+                                </goals>
+                                <configuration>
+                                    <arguments>install --ignore-scripts</arguments>
+                                </configuration>
+                            </execution>
+                            <execution>
+                                <id>grunt dist</id>
+                                <goals>
+                                    <goal>grunt</goal>
+                                </goals>
+                                <configuration>
+                                    <arguments>build</arguments>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
     </profiles>
 
     <dependencies>
@@ -219,51 +337,9 @@
             <artifactId>commons-io</artifactId>
         </dependency>
     </dependencies>
-
     <build>
         <plugins>
             <plugin>
-                <groupId>com.github.eirslett</groupId>
-                <artifactId>frontend-maven-plugin</artifactId>
-                <version>0.0.23</version>
-                <!-- optional -->
-                <configuration>
-                    <workingDirectory>../dashboard/v2/</workingDirectory>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>install node and npm</id>
-                        <goals>
-                            <goal>install-node-and-npm</goal>
-                        </goals>
-                        <configuration>
-                            <nodeVersion>v0.10.30</nodeVersion>
-                            <npmVersion>1.4.3</npmVersion>
-                        </configuration>
-                    </execution>
-
-                    <execution>
-                        <id>npm install</id>
-                        <goals>
-                            <goal>npm</goal>
-                        </goals>
-                        <configuration>
-                            <arguments>install</arguments>
-                        </configuration>
-                    </execution>
-
-                    <execution>
-                        <id>grunt dist</id>
-                        <goals>
-                            <goal>grunt</goal>
-                        </goals>
-                        <configuration>
-                            <arguments>build</arguments>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-javadoc-plugin</artifactId>
                 <executions>
@@ -291,7 +367,7 @@
                     <attachClasses>true</attachClasses>
                     <webResources>
                         <resource>
-                            <directory>../dashboard/v2/dist</directory>
+                            <directory>target/dist</directory>
                             <targetPath>/</targetPath>
                         </resource>
                         <resource>


Mime
View raw message