I want to know how one can compress javascriptfiles using maven. I have lready visited webistes like http://mojohaus.org/javascript-maven-tools/guide-webapp-development.ht
I suggest using the YUI Compressor Maven Mojo and its yuicompressor:compress goal instead. It is well documented, it just works.
To use it, add the following pluginRepository
:
oss.sonatype.org - github-releases
oss.sonatype.org-github-releases
http://oss.sonatype.org/content/repositories/github-releases
And declare the plugin:
...
net.alchim31.maven
yuicompressor-maven-plugin
0.9
...
net.alchim31.maven
yuicompressor-maven-plugin
compress
...
...
Refer to the Usage page and the parameters of yuicompressor:compress for precise configuration.