David,
Your ear module should not inherit dependencies that it doesn't need.
One solution is to have your ear module NOT inherit from the parent pom.
Another solution is to use the <dependencyManagement> section in the
parent pom, and then specify which dependencies each module *really*
uses in their own poms. <dependencyManagement> allows you to control
dependency versions (and scope, etc.) across your whole project, without
forcing modules to inherit dependencies they don't need. It is sloppy to
have modules inheriting dependencies that they don't need, and this
strategy eliminates the slop.
A third solution is to have two levels of parent poms. One stripped-down
super-parent, with no dependencies specified. The ear module will
inherit directly from this super-parent. Then make your existing parent,
the one with all the dependencies, also inherit from the super-parent.
The other modules that really need the dependencies will inherit from
the parent, rather than the super-parent.
-Max
David Smiley wrote:
Hi. I have a multi-module project. My parent pom specifies the dependencies
that are used by practically everything. I have an ear module that's sole
purpose is to package up two war files (in other modules), but nothing else.
It does this but includes jar's specified by my parent pom. But I don't
want any of those at all... since they are included already in both war
files. I want to keep the war files that way because that makes them
independently complete. I looked at the ear plugin page and I see a mention
of "excludes" but it doesn't seem to work. I have it like so:
<excludes>*.jar</excludes>
What should I do?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]