I'm wondering what “best practices” integrate the “modern JavaScript build workflow” into the Maven build, which creates a WAR artifact.
I found several maven plugins that handle concatenation and minimization:
However, I still do not understand how they fit into the workflow of a complete assembly, since I believe that it is necessary to enable / disable concatenation / minimization:
For development, I want to create a WAR that does not contain concatenated / mined resources so that I can debug conveniently. To build an assembly, I want to create a WAR that contains concatenated / mined resources.
Also, to build the assembly, I have to “rewrite” the script URLs in my html to indicate a concatenation / smaller version of script (s).
In the JavaScript world, I would use Grunt with various grunt tasks (uglify, usemin) to achieve the above workflow. How can I achieve the same in a Maven assembly?
source share