Static resource manager for Java webapps

Not a Java guy here, so sorry if this is something trivial.

Most modern web application frameworks support some kind of asset manager that makes it easy to include a script or stylesheet, and also usually supports the concept of linking and minifying.

Are there such libraries for Java based web applications? I am using Spring 3.x

Right now, we just have an assembly script that has hard-coded lists of assets that need to be merged together, and our code has something like (pseudocode):

if (production) {
   <script src="bundle1.js">
} else {
   <script src="file1.js">
   <script src="file2.js">
   <script src="file3.js">


This is much less than ideal - who wants to update the hardcoded list?


source to share

1 answer

Jenkins seems to be able to help you. it's easy to use and very intuitive.

It is an open source continuous integration tool written in Java.

Jenkins provides continuous integration services for software development, primarily in the Java programming language. It is a server system running in a servlet container like Apache Tomcat. It supports SCM tools including CVS, Subversion, Git, Mercurial, Perforce, and Clearcase, and can run Apache Ant and Apache Maven projects, as well as arbitrary shell scripts and Windows command commands. / p>

A build can be triggered in a variety of ways, including starting by committing in source control, scheduling through a mechanism like cron, building when other builds are complete, and by requesting a specific build url.


jwar might suit you. it allows you to minimize javascript and css and spring integration .

Hope it helps



All Articles