ranger-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Csaba Koncz <csabako...@gmail.com>
Subject Re: Review Request 68770: RANGER-2220 minify JavaScript files during packaging
Date Fri, 21 Sep 2018 17:28:09 GMT


> On Sept. 21, 2018, 12:01 a.m., Velmurugan Periasamy wrote:
> >

Reworked the patch so that it uses nodejs instead of jjs/Nashorn. RequireJS optimizer (r.js)
does not need to be versioned, instead it is downloaded using npm during the build.


> On Sept. 21, 2018, 12:01 a.m., Velmurugan Periasamy wrote:
> > security-admin/scripts-js/minify.build.js
> > Lines 1 (patched)
> > <https://reviews.apache.org/r/68770/diff/1/?file=2090351#file2090351line1>
> >
> >     Can this be used? This will fail rat plugin with unapproved license.

Correct, will add the license.


> On Sept. 21, 2018, 12:01 a.m., Velmurugan Periasamy wrote:
> > security-admin/scripts-js/r.js
> > Lines 1 (patched)
> > <https://reviews.apache.org/r/68770/diff/1/?file=2090352#file2090352line1>
> >
> >     Can this be used? This will fail rat plugin with unapproved license.

This file is similar to the ones in src/main/webapp/lib which are excluded in the rat plugin
config.
Shall I do the same? (i.e. exclude it just like bootstrap.min.js is excluded here: https://github.com/apache/ranger/blob/master/pom.xml#L574)

Another option would be to remove this file from version control and download it during runtime
using npm.
That implies introducing the frontend maven plugin to donwload node and npm. 
It seems a bit of hassle, but probably it is the right thing to do. 
The benefits would be faster JavaScript minification and not depending on JDK8 and presence
of jjs
(which will be deprecated in Java 11 http://openjdk.java.net/jeps/335)


- Csaba


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68770/#review208826
-----------------------------------------------------------


On Sept. 21, 2018, 5:21 p.m., Csaba Koncz wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68770/
> -----------------------------------------------------------
> 
> (Updated Sept. 21, 2018, 5:21 p.m.)
> 
> 
> Review request for ranger.
> 
> 
> Bugs: RANGER-2220
>     https://issues.apache.org/jira/browse/RANGER-2220
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Maven build modified so that the admin UI JavaScript resources are concatenated/compressed
using the RequireJS Optimizer.
> During the packaging phase index.html is rewritten so that it loads the compressed JS
file instead of the JS source tree.
> 
> 
> Diffs
> -----
> 
>   security-admin/.gitignore 5a3a67338 
>   security-admin/package-lock.json PRE-CREATION 
>   security-admin/package.json PRE-CREATION 
>   security-admin/pom.xml 84bbd6650 
>   security-admin/src/main/webapp/index.html 60ef5a75b 
>   security-admin/src/main/webapp/libs/bower/backbone-forms/js/bootstrap.js 276175505

>   security-admin/src/main/webapp/libs/bower/backbone.bootstrap-modal/js/backbone.bootstrap-modal.js
6cd05b03d 
>   security-admin/src/main/webapp/minify.build.js PRE-CREATION 
>   security-admin/src/main/webapp/scripts/Init.js 4493f62e0 
>   security-admin/src/main/webapp/scripts/Main.js d518afbf2 
> 
> 
> Diff: https://reviews.apache.org/r/68770/diff/2/
> 
> 
> Testing
> -------
> 
> Performed:
> 
> mvn package -pl security-admin -am
> cd security-admin/
> cd security-admin/target/security-admin-web-2.0.0-SNAPSHOT
> http-server
> # opened http://localhost:8080 and inspected browser network tab and console:
> # network tab lists only 26 requests
> # console contains no packaging related errors (it contains 4 errors due to missing backend
service)
> 
> 
> Thanks,
> 
> Csaba Koncz
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message