Reputation: 2030
I'm running an application with several different features, they are completely independent; the only reason is i run them together is i run them on a small vps with limited memory;
I'm expecting:
develop each module seperately
combine them together into one application using some ant tasks;
for a ear file, we can combine several different war files into one, and they can run fine without impacting each other, however, since I'm running a tomcat and do not want to involve heavy containers like jboss or so on, an ear file is not available;
is there a way that we can achieve this? such as we develop something standalone and then package them into a jar, put it into web-inf/lib and it will just work? thx.
the options i've used:
Upvotes: 1
Views: 1940
Reputation: 21
You need to build some kind of wall, so would exist a technical restriction to avoid that a bad developer could break your design generating innecesary dependence. You could put all the java classes in different jars embedded in your new merged web project and just keeping the web content in the same project but separate folders.
Maven+SVN could host and provide the jars to the new project.
Upvotes: 0
Reputation: 54856
You can do this using Maven (if you're happy to use Maven instead of Ant), and the Cargo plugin for Maven. It has an 'uberwar' packaging format that allows multiple WAR files to be merged into a single combined WAR file. Details are available here:
http://cargo.codehaus.org/Merging+WAR+files
Upvotes: 4