After executing the plugin I end up with a file called app.min.js and style.min.css that each contain all the js minified and all the css minified !
Note that we followed the advice of this article on how to structure our app.
In order to be able to minify your angular code you have to declare your controller, factories etc in a certain manner. The goal is to avoid your injected dependencies to be renamed by the minifier process.
To sum up you have to declare your controller like this
In order to use app.min.js and style.min.css I had to change the index.html page of our application to reference those new files. Problem is that those 2 files are generated inside the target/APPNAME-VERSION directory. Thus they are not usable when using mvn tomcat:run. I could have done some ugly hacks in the pom to copy those file in the src directory (that is used by tomcat when running mvn tomcat:run) but this is really too ugly.
The solution I came up with is simply to have 2 index pages
one page for production : index.html
one page for dev : indexdev.html
Inside the indexdev.html I reference all the js files and css files. It enables debug. The only thing is to remember to type the right url in the browser when starting the application in dev mode.
For production I believe you can exclude the indexdev.html when generating your war in maven (not tried yet).