Reputation: 1610
I'm trying to figure out the best maven configuration for a unusual web app configuration.
We have two web apps that we are migrating to maven. We use Eclipse as our IDE.
The structure is as follows, we have a main web app that has all the normal web app information. A standard config as far as Eclipse WTP and Maven are concerned. Then we have a second web app that contains everything that the previous web app but in addition it extends classes/creates new ones, overrides jsp files and adds additional ones. In addition we have shared resources that both web apps import.
We currently have a very complex ant build script that handles this. I was thinking of setting it up as different webapps in Eclipse (and finding a way to share the resources) or as a multi-module app (not sure how to handle two web app modules), but I'm not really sure how to set it up or if there is a better solution.
Upvotes: 0
Views: 333
Reputation: 18218
If the two applications must live on the same server you could put both your applications inside an EAR. Beware that different application servers have different opinions on how class loading should be handled. In my experience WebSphere 7 follows J2EE specifications more strictly than JBoss 5.1; I have no specific experience with other products and/or versions.
If this is not the case and your applications only share resources at development time, WAR overlay may be an approach worth exploring.
Both approaches should be supported by both Maven and the WTP addon for the m2eclipse plugin, but these things are evolving right now and you'd better do some experiments before committing to this route.
Upvotes: 1