Our web application has static content packaged as part of WAR. We have been planning to move it out of the project and host it directly on Apache to achieve the following objectives.
- It's getting too big and bloating the EAR size resulting in slower deployment across nodes. Faster deployment times.
- Take the load of Application Server
- Host the static content on a sub domain allowing some browsers (IE) to load resources simultaneously
- Give us an option to use further caching such as Apache
mod_cache
apart from the cache headers we send out to browsers.
We use yuicompressor-maven-plugin
to aggregate and minimize JS file.
My question is how to package and manage this static content outside of the web application?
My current options are:
- New maven war project. Still use the same plugin for aggregation and compression.
- Just a plain directory in SVN and use YUI/Google compressor directly.
Or is there a better technology out there to manage static content as a project?
Best Answer
It sounds like the static resources change rarely, if ever, and require significant additional space and time to process.
I would have a separate WAR file. There are several benefits to doing this: