----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/68770/#review208773 -----------------------------------------------------------
security-admin/pom.xml Line 563 (original), 564 (patched) <https://reviews.apache.org/r/68770/#comment292940> these old includes had no effect (pat security-admin/pom.xml Lines 572 (patched) <https://reviews.apache.org/r/68770/#comment292941> lines staring with <!-- dev --> are commented out security-admin/pom.xml Lines 576 (patched) <https://reviews.apache.org/r/68770/#comment292942> lines in the form <!-- prod CONTENT --> are transformed into <!-- prod --> CONTENT, i.e. the CONTENT becomes uncommented. security-admin/pom.xml Lines 607 (patched) <https://reviews.apache.org/r/68770/#comment292943> Assume JDK8 (Nashorn interpreter (jjs) should be available) security-admin/scripts-js/minify.build.js Lines 1 (patched) <https://reviews.apache.org/r/68770/#comment292944> This file is only for manually testing the minification without running mvn package. It is not used by the maven build. security-admin/scripts-js/r.js Lines 1 (patched) <https://reviews.apache.org/r/68770/#comment292945> RequireJS Optimizer included unchanged. security-admin/src/main/webapp/index.html Lines 129 (patched) <https://reviews.apache.org/r/68770/#comment292946> The line starting with <!-- dev --> loads the individual JS files security-admin/src/main/webapp/index.html Lines 130 (patched) <https://reviews.apache.org/r/68770/#comment292947> The "<!-- prod" line assumes the compressed file was created. security-admin/src/main/webapp/libs/bower/backbone-forms/js/bootstrap.js Line 6 (original), 6 (patched) <https://reviews.apache.org/r/68770/#comment292948> When building the minified file RequireJS ignores module shim configuration if the module is itself an AMD module. bootstrap.js is such a module, but fails to name one of its dependencies ('backbone-forms.list') security-admin/src/main/webapp/libs/bower/backbone.bootstrap-modal/js/backbone.bootstrap-modal.js Line 265 (original) <https://reviews.apache.org/r/68770/#comment292949> This file is mistakenly recognized as an AMD by RequireJS, although it is not (the define call does not name any of the dependencies). Had to remove the define() call so that the shim configuration is taken into account. security-admin/src/main/webapp/scripts/Init.js Line 22 (original), 22 (patched) <https://reviews.apache.org/r/68770/#comment292950> since this file is no longer loaded through a data-main script attribute, the base Url must be set. security-admin/src/main/webapp/scripts/Init.js Line 27 (original), 27 (patched) <https://reviews.apache.org/r/68770/#comment292953> Main.js is the single entry point of the app, it has the other dependencies ('backbone.marionette', etc) in its dependency tree. Removing them simplifies the code and makes clear why the Optimizer starts only from Main.js. security-admin/src/main/webapp/scripts/Init.js Line 30 (original) <https://reviews.apache.org/r/68770/#comment292952> Shims for AMD modules are ignored by the Optimizer (and are bad practice anyhow, shims are meant for use with non-AMDs) security-admin/src/main/webapp/scripts/Main.js Lines 30 (patched) <https://reviews.apache.org/r/68770/#comment292954> 'backbone-fetch-cache' was not a direct dependency. - Csaba Koncz On Sept. 19, 2018, 8:33 p.m., Csaba Koncz wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/68770/ > ----------------------------------------------------------- > > (Updated Sept. 19, 2018, 8:33 p.m.) > > > Review request for ranger. > > > Bugs: RANGER-2220 > https://issues.apache.org/jira/browse/RANGER-2220 > > > Repository: ranger > > > Description > ------- > > Maven build modifies 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/pom.xml 84bbd6650 > security-admin/scripts-js/minify.build.js PRE-CREATION > security-admin/scripts-js/r.js PRE-CREATION > 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/scripts/Init.js 4493f62e0 > security-admin/src/main/webapp/scripts/Main.js d518afbf2 > > > Diff: https://reviews.apache.org/r/68770/diff/1/ > > > 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 > >
