Maven Javascript Compressor

I want to know how one can compress javascriptfiles using maven. I have lready visited webistes like but there is no implementation explained.

I want to know the dependency for executing the maven plugin.


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:

      <name> - github-releases</name>

And declare the plugin:

    <!-- To define the plugin version in your parent POM -->
    <!-- To use the plugin goals in your POM or parent POM -->

Refer to the Usage page and the parameters of yuicompressor:compress for precise configuration.

The best and the most advanced one I found till today is wro4j. The idea for the library and the Maven plugin is different from everything I was able to find on the internet, combining pretty much every tool available into one standalone library. Amazing.

You have two modes with wro4j available - first is to operate dynamically as a filter in Java application, second is to use build-time solution with Maven plugin. It's all really straightforward and well explained on the project documentation section, so take a look and dive deep. There are fully operational and well explained examples on how to integrate wro4j with one's application or with Maven build process.

You can look at cactus maven plugin

Need Your Help

Smarty replace and array

php arrays smarty

I'm working on a site for some apartments.