Sample application which shows hot to minify javascripts and css files using maven plugin
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src/main/webapp
README.md
pom.xml

README.md

How to minify javascript and css file using maven plugin

Sample application which shows how to minify javascript and css files using maven plugin.

This application uses embeded jetty server so use the following commands to build and run application.

To build application:

mvn clean install

To run jetty server:

mvn jetty:run

Hit following urls from browser to check minified javascript and css files.

http://127.0.0.1:8080/scripts/minified/sample1.js http://127.0.0.1:8080/scripts/minified/sample2.js

http://127.0.0.1:8080/styles/minified/sample1.css http://127.0.0.1:8080/styles/minified/sample2.css

Use the following url which returns index page so you can confirm that javascript and css files are functioning properly:

http://127.0.0.1:8080/index.jsp

For more details refer articale at: http://www.elitejavacoder.com/2014/07/how-to-minify-javascript-and-css-files.html