TEZ-3285. Tez UI: Lock down dependency versions (sree)
Project: http://git-wip-us.apache.org/repos/asf/tez/repo Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/e0ee28ae Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/e0ee28ae Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/e0ee28ae Branch: refs/heads/master Commit: e0ee28ae6be505cafff6088bd4985c2bc143393d Parents: 04f0c76 Author: Sreenath Somarajapuram <[email protected]> Authored: Mon Apr 10 15:07:41 2017 +0530 Committer: Sreenath Somarajapuram <[email protected]> Committed: Mon Apr 10 15:07:41 2017 +0530 ---------------------------------------------------------------------- BUILDING.txt | 9 +- pom.xml | 2 +- tez-ui/README.md | 26 +- tez-ui/pom.xml | 67 +- tez-ui/src/main/webapp/.bowerrc | 5 +- tez-ui/src/main/webapp/README.md | 26 +- tez-ui/src/main/webapp/bower-shrinkwrap.json | 71 + tez-ui/src/main/webapp/package.json | 5 +- tez-ui/src/main/webapp/yarn.lock | 4945 +++++++++++++++++++++ 9 files changed, 5109 insertions(+), 47 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tez/blob/e0ee28ae/BUILDING.txt ---------------------------------------------------------------------- diff --git a/BUILDING.txt b/BUILDING.txt index c62f249..0907b6e 100644 --- a/BUILDING.txt +++ b/BUILDING.txt @@ -99,15 +99,10 @@ In case of issue with UI build, please clean the UI cache. Issue with PhantomJS on building in PowerPC. - Official PhantomJS binaries are not yet available for Power platform. Hence you would have to - manually install it. Please refer to https://github.com/ibmsoe/phantomjs-1/blob/v2.1.1-ppc64/README.md + Official PhantomJS binaries were not available for Power platform. Hence if the build fails in PPC + please try installing PhantomJS manually and rerun. Refer https://github.com/ibmsoe/phantomjs-1/blob/v2.1.1-ppc64/README.md and install it globally for the build to work. -Issue with PhantomJS on building in RHEL 6 - Latest versions of Node JS doesn't work well with RHEL 6. -Please use the following profile to build with an older version of Node. - - $ mvn package -PuseNode012 - ---------------------------------------------------------------------------------- Protocol Buffer compiler: http://git-wip-us.apache.org/repos/asf/tez/blob/e0ee28ae/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 2bbac69..22647cf 100644 --- a/pom.xml +++ b/pom.xml @@ -55,7 +55,7 @@ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <scm.url>scm:git:https://git-wip-us.apache.org/repos/asf/tez.git</scm.url> <build.time>${maven.build.timestamp}</build.time> - <frontend-maven-plugin.version>1.1</frontend-maven-plugin.version> + <frontend-maven-plugin.version>1.2</frontend-maven-plugin.version> <findbugs-maven-plugin.version>3.0.1</findbugs-maven-plugin.version> <javadoc-maven-plugin.version>2.9.1</javadoc-maven-plugin.version> </properties> http://git-wip-us.apache.org/repos/asf/tez/blob/e0ee28ae/tez-ui/README.md ---------------------------------------------------------------------- diff --git a/tez-ui/README.md b/tez-ui/README.md index f8985fe..cf62cdc 100644 --- a/tez-ui/README.md +++ b/tez-ui/README.md @@ -66,24 +66,38 @@ All the following commands must be run inside `src/main/webapp`. You will need the following things properly installed on your computer. -* Install [Node.js](http://nodejs.org/) (with NPM) -* Install [Bower](http://bower.io/) -* Install all dependencies by running `npm install` & `bower install` +* Install [Yarn](https://yarnpkg.com) v0.21.3 +* Install [Bower](http://bower.io/) v1.7.7 +* Install all dependencies by running `yarn install` & `bower install` ### Running UI -* `npm start` +* `yarn start` * Visit your app at [http://localhost:4200](http://localhost:4200). ### Running Tests -* `npm test` +* `yarn test` ### Building -* `npm run build` (production) +* `yarn run build` (production) * Files would be stored in "dist/" +### Adding new dependencies + +**Warning: Do not edit the _package.json_ or _bower.json_ files manually. This could make them out-of-sync with the respective lock or shrinkwrap files.** + +Tez UI has replaced NPM with Yarn package manager. And hence Yarn would be used to manage dependencies defined in package.json. + +* Please use the Yarn and Bower command-line tools to add new dependencies. And the tool version must be same as those defined in Prerequisites section. +* Once any dependency is added: + * If it's in package.json. Make sure that the respective, and only those changes are reflected in yarn.lock file. + * If it's in bower.json. Make sure that the respective, and only those changes are reflected in bower-shrinkwrap.json file. +* Commands to add using CLI tools: + * Yarn: yarn add [package-name] + * Bower: bower install --save [package-name] + ### Adding new routes (pages), controllers, components etc. * Use ember-cli blueprint generator - [Ember CLI](http://ember-cli.com/extending/#generators-and-blueprints) http://git-wip-us.apache.org/repos/asf/tez/blob/e0ee28ae/tez-ui/pom.xml ---------------------------------------------------------------------- diff --git a/tez-ui/pom.xml b/tez-ui/pom.xml index 71dd13b..ae60abb 100644 --- a/tez-ui/pom.xml +++ b/tez-ui/pom.xml @@ -28,23 +28,17 @@ <properties> <webappDir>src/main/webapp</webappDir> - <node.executable>${basedir}/src/main/webapp/node/node</node.executable> - <nodeVersion>v5.7.1</nodeVersion> - <npmVersion>3.6.0</npmVersion> + + <nodeVersion>v5.12.0</nodeVersion> + <nodeExecutable>${basedir}/src/main/webapp/node/node</nodeExecutable> + + <packageManagerScript>node/yarn/dist/bin/yarn.js</packageManagerScript> + <skipTests>false</skipTests> </properties> <profiles> - <profile> - <id>useNode012</id> - <activation> - <activeByDefault>false</activeByDefault> - </activation> - <properties> - <nodeVersion>v0.12.18</nodeVersion> - <npmVersion>2.15.11</npmVersion> - </properties> - </profile> + <!-- Clear temporary directories --> <profile> <id>cleanUICache</id> <activation> @@ -58,6 +52,9 @@ <configuration> <filesets> <fileset> + <directory>${webappDir}/dist</directory> + </fileset> + <fileset> <directory>${webappDir}/tmp</directory> </fileset> <fileset> @@ -80,7 +77,7 @@ <build> <plugins> - <!-- Apache RAT --> + <!-- Apache RAT check --> <plugin> <groupId>org.apache.rat</groupId> <artifactId>apache-rat-plugin</artifactId> @@ -101,8 +98,10 @@ <exclude>src/main/webapp/blueprints/.jshintrc</exclude> <exclude>src/main/webapp/.watchmanconfig</exclude> <exclude>src/main/webapp/bower.json</exclude> + <exclude>src/main/webapp/bower-shrinkwrap.json</exclude> <exclude>src/main/webapp/ember-cli-build.js</exclude> <exclude>src/main/webapp/package.json</exclude> + <exclude>src/main/webapp/yarn.lock</exclude> <exclude>src/main/webapp/testem.json</exclude> <exclude>src/main/webapp/public/assets/images/*</exclude> <exclude>src/main/webapp/WEB-INF/wro.xml</exclude> @@ -110,7 +109,7 @@ </configuration> </plugin> - <!-- Install Node & dependencies --> + <!-- Install Node, Yarn, Bower & dependencies --> <plugin> <groupId>com.github.eirslett</groupId> <artifactId>frontend-maven-plugin</artifactId> @@ -118,27 +117,35 @@ <workingDirectory>${webappDir}</workingDirectory> </configuration> <executions> + + <!-- Install all dependencies --> <execution> <phase>generate-resources</phase> - <id>install node and npm</id> + <id>install node and yarn</id> <goals> - <goal>install-node-and-npm</goal> + <goal>install-node-and-yarn</goal> </goals> <configuration> <nodeVersion>${nodeVersion}</nodeVersion> - <npmVersion>${npmVersion}</npmVersion> + <yarnVersion>v0.21.3</yarnVersion> </configuration> </execution> <execution> <phase>generate-resources</phase> - <id>npm install</id> + <id>yarn install</id> <goals> - <goal>npm</goal> + <goal>yarn</goal> </goals> + <configuration> + <arguments>install</arguments> + </configuration> </execution> <execution> <phase>generate-resources</phase> <id>bower install</id> + <configuration> + <arguments>install</arguments> + </configuration> <goals> <goal>bower</goal> </goals> @@ -146,11 +153,12 @@ </executions> </plugin> - <!-- Build & Test --> <plugin> <artifactId>exec-maven-plugin</artifactId> <groupId>org.codehaus.mojo</groupId> <executions> + + <!-- Build --> <execution> <id>ember build</id> <phase>generate-resources</phase> @@ -159,14 +167,16 @@ </goals> <configuration> <workingDirectory>${webappDir}</workingDirectory> - <executable>${node.executable}</executable> + <executable>${nodeExecutable}</executable> <arguments> - <argument>node/node_modules/npm/bin/npm-cli</argument> + <argument>${packageManagerScript}</argument> <argument>run</argument> <argument>build:mvn</argument> </arguments> </configuration> </execution> + + <!-- Test if enabled--> <execution> <id>ember test</id> <phase>test</phase> @@ -176,9 +186,9 @@ <configuration> <skip>${skipTests}</skip> <workingDirectory>${webappDir}</workingDirectory> - <executable>${node.executable}</executable> + <executable>${nodeExecutable}</executable> <arguments> - <argument>node/node_modules/npm/bin/npm-cli</argument> + <argument>${packageManagerScript}</argument> <argument>run</argument> <argument>test:mvn</argument> </arguments> @@ -233,6 +243,13 @@ </configuration> </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <configuration> + <skipIfEmpty>true</skipIfEmpty> + </configuration> + </plugin> </plugins> </build> </project> http://git-wip-us.apache.org/repos/asf/tez/blob/e0ee28ae/tez-ui/src/main/webapp/.bowerrc ---------------------------------------------------------------------- diff --git a/tez-ui/src/main/webapp/.bowerrc b/tez-ui/src/main/webapp/.bowerrc index 959e169..5b0b07d 100644 --- a/tez-ui/src/main/webapp/.bowerrc +++ b/tez-ui/src/main/webapp/.bowerrc @@ -1,4 +1,7 @@ { "directory": "bower_components", - "analytics": false + "analytics": false, + "resolvers": [ + "bower-shrinkwrap-resolver-ext" + ] } http://git-wip-us.apache.org/repos/asf/tez/blob/e0ee28ae/tez-ui/src/main/webapp/README.md ---------------------------------------------------------------------- diff --git a/tez-ui/src/main/webapp/README.md b/tez-ui/src/main/webapp/README.md index 997752c..0443df4 100644 --- a/tez-ui/src/main/webapp/README.md +++ b/tez-ui/src/main/webapp/README.md @@ -34,24 +34,38 @@ All the following commands must be run inside `src/main/webapp`. You will need the following things properly installed on your computer. -* Install [Node.js](http://nodejs.org/) (with NPM) -* Install [Bower](http://bower.io/) -* Install all dependencies by running `npm install` & `bower install` +* Install [Yarn](https://yarnpkg.com) v0.21.3 +* Install [Bower](http://bower.io/) v1.7.7 +* Install all dependencies by running `yarn install` & `bower install` ### Running UI -* `npm start` +* `yarn start` * Visit your app at [http://localhost:4200](http://localhost:4200). ### Running Tests -* `npm test` +* `yarn test` ### Building -* `npm run build` (production) +* `yarn run build` (production) * Files would be stored in "dist/" +### Adding new dependencies + +**Warning: Do not edit the _package.json_ or _bower.json_ files manually. This could make them out-of-sync with the respective lock or shrinkwrap files.** + +Tez UI has replaced NPM with Yarn package manager. And hence Yarn would be used to manage dependencies defined in package.json. + +* Please use the Yarn and Bower command-line tools to add new dependencies. And the tool version must be same as those defined in Prerequisites section. +* Once any dependency is added: + * If it's in package.json. Make sure that the respective, and only those changes are reflected in yarn.lock file. + * If it's in bower.json. Make sure that the respective, and only those changes are reflected in bower-shrinkwrap.json file. +* Commands to add using CLI tools: + * Yarn: yarn add [package-name] + * Bower: bower install --save [package-name] + ### Adding new routes (pages), controllers, components etc. * Use ember-cli blueprint generator - [Ember CLI](http://ember-cli.com/extending/#generators-and-blueprints) http://git-wip-us.apache.org/repos/asf/tez/blob/e0ee28ae/tez-ui/src/main/webapp/bower-shrinkwrap.json ---------------------------------------------------------------------- diff --git a/tez-ui/src/main/webapp/bower-shrinkwrap.json b/tez-ui/src/main/webapp/bower-shrinkwrap.json new file mode 100644 index 0000000..6daaaeb --- /dev/null +++ b/tez-ui/src/main/webapp/bower-shrinkwrap.json @@ -0,0 +1,71 @@ +{ + "https://github.com/FortAwesome/Font-Awesome.git": { + "4.5.0": "593ad563a987977f14102be935d0abc2a172903e" + }, + "https://github.com/Teleborder/FileSaver.js.git": { + "1.20150507.2": "b7cf622909258086bc63ad764d08fcaed780ab42" + }, + "https://github.com/adamwdraper/Numeral-js.git": { + "1.5.3": "f97f14bb8bab988f28f1d854525b4cfeff8ec9e1" + }, + "https://github.com/components/codemirror.git": { + "5.11.0": "7d43f32bb56f83a9c47addb3f91170b3102f3ead" + }, + "https://github.com/components/ember-data.git": { + "2.1.0": "d8b4d3092f67afe22d9d374c40d719d557915fa3" + }, + "https://github.com/components/ember.git": { + "2.2.0": "49e042ca89922ed96b27488c2a98add280ae7123" + }, + "https://github.com/components/jqueryui.git": { + "1.11.4": "c34f8dbf3ba57b3784b93f26119f436c0e8288e1" + }, + "https://github.com/dockyard/ember-qunit-notifications.git": { + "0.1.0": "a83277aa7a1c0545c66e6d133caebb9a620e71ad" + }, + "https://github.com/dockyard/qunit-notifications.git": { + "0.1.1": "7a13f6dba5a340e1cb9e0b64c1c711e4d7edaca1" + }, + "https://github.com/ember-cli/ember-cli-shims.git": { + "0.0.6": "dcab43b58d5698690050bb9a46ead5c8663c7da1" + }, + "https://github.com/ember-cli/ember-cli-test-loader.git": { + "0.2.1": "3348d801089279296c38f31ae14d9c4d115ce154" + }, + "https://github.com/ember-cli/ember-load-initializers.git": { + "0.1.7": "7bb21488563bd1bba23e903a812bf5815beddd1a" + }, + "https://github.com/jquery/jquery-dist.git": { + "2.1.4": "7751e69b615c6eca6f783a81e292a55725af6b85" + }, + "https://github.com/jquery/jquery-mousewheel.git": { + "3.1.13": "67289b6b2aa0066d7d78a5807f520387135ffb22" + }, + "https://github.com/jquery/qunit.git": { + "1.19.0": "467e7e34652ad7d5883ce9c568461cf8c5e172a8" + }, + "https://github.com/moment/moment-timezone.git": { + "0.5.0": "74a2e9378ecf4a31a168f3049f086565c8d66814" + }, + "https://github.com/moment/moment.git": { + "2.12.0": "d3d7488b4d60632854181cb0a9af325d57fb3d51" + }, + "https://github.com/rwjblue/ember-qunit-builds.git": { + "0.4.16": "142c4066a5458bef9dfcb92b70152b9c01d79188" + }, + "https://github.com/sreenaths/more-js.git": { + "0.8.6": "f1d9ccdaf7ff74c26b6ee341067a5a5ef33bd64a" + }, + "https://github.com/sreenaths/snippet-ss.git": { + "1.11.0": "c1abc566f4e001b7f1939b6dbdd911eadc969cf9" + }, + "https://github.com/sreenaths/zip.js.git": { + "1.0.0": "ec67ad22eba116083ea3ef2fe0b40ccc953513ce" + }, + "https://github.com/stefanpenner/loader.js.git": { + "3.3.0": "ac909550c9544325632542bbea97531cc60bc628" + }, + "https://github.com/twbs/bootstrap.git": { + "3.3.6": "81df608a40bf0629a1dc08e584849bb1e43e0b7a" + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tez/blob/e0ee28ae/tez-ui/src/main/webapp/package.json ---------------------------------------------------------------------- diff --git a/tez-ui/src/main/webapp/package.json b/tez-ui/src/main/webapp/package.json index d85766b..7c9e348 100644 --- a/tez-ui/src/main/webapp/package.json +++ b/tez-ui/src/main/webapp/package.json @@ -29,7 +29,7 @@ "broccoli-funnel": "1.0.1", "broccoli-merge-trees": "1.1.1", "ember-bootstrap": "0.5.1", - "ember-cli": "^1.13.13", + "ember-cli": "1.13.14", "ember-cli-app-version": "1.0.0", "ember-cli-auto-register": "1.1.0", "ember-cli-babel": "5.1.6", @@ -54,6 +54,9 @@ "ember-export-application-global": "1.0.5", "ember-resolver": "^2.0.3", "ember-truth-helpers": "1.2.0", + "bower-shrinkwrap-resolver-ext": "^0.1.0", + "loader.js": "4.2.3", + "testem": "0.9.11", "phantomjs-prebuilt": "2.1.13" }, "dependencies": {
