I have the following project: 5(+) jars, each building specific components, with both common dependencies and jar-specific dependencies 1 war (which bundles these jars, and their dependencies) 1 ear (which holds the war and only the war)
How do I fit all of this nicely into maven?
I had the following setup:
project-root.pom
|- generic jar dependency 1
|- generic jar dependency 2
|- modules
| - jar 1 (uses generic dependencies, and a couple of others)
| - jar 2 (uses generic dependencies, and a couple of others)
| - war project (uses generic jars, and jar 1 and 2)
| - ear project
But this doesn't work, as the ear project will include the generic jar dependencies of the parent in the /lib folder.
How can such a project be set up nicely in maven?
Update
I kinda worked around it by having a root pom which declares modules for jar1, 2, the war and the ear project, but only having jar1, jar2, and the war inherit from the parent pom. The ear project doesn't. Is this proper practice?