Hi,
I am trying to figure out what is the best structure for my project.
At the moment, there is only one project which consists of a parent project
with several modules :
foo (parent)
> moduleBusiness (jar)
>> pom.xml
> moduleApplication (jar)
>> pom.xml
> modulePersistence (jar)
>> pom.xml
> moduleWebServices (jar)
>> pom.xml
> moduleWebAppGWT1 (war)
>> pom.xml
> moduleWebAppGWT2 (war)
>> pom.xml
> moduleWebAppGWT3 (war)
>> pom.xml
> moduleWebAppGWT4 (war)
>> pom.xml
pom.xml
We want to produce an EAR archive that contains the 4 JARS. We want to separate
the WAR archives
from the rest because we do not want to have to rebuild the entire app if we
just want to modify
one web app. So in the end, there would be 5 archives deployed to the server: 1
EAR (with 4 jars)
and 4 WARS.
So the 4 WAR modules have their own lifecycle. I read that, in this case, it's
best to put each module
in its own project.
So that would suppose to rearrange things like this :
foo1 (parent1)
> moduleBusiness (jar)
>> pom.xml
> moduleApplication (jar)
>> pom.xml
> modulePersistence (jar)
>> pom.xml
> moduleWebServices (jar)
>> pom.xml
pom.xml
foo2 (parent2)
> moduleWebAppGWT1 (war)
>> pom.xml
pom.xml
foo3 (parent3)
> moduleWebAppGWT2 (war)
>> pom.xml
pom.xml
foo4 (parent4)
> moduleWebAppGWT3 (war)
>> pom.xml
foo5 (parent5)
> moduleWebAppGWT5 (war)
>> pom.xml
What do you think ? And can i easily add to the WAR projects (foo2, foo3, foo4
and foo5) dependencies from the foo1 project ?
Thanks for helping.