I'm new to Maven, and I am struggling to figure out how to get it to do
packaging in accordance with the standards at my work place.  Suppose I have
an ejb called project-ejb, that depends on a library called caf-3.1.0.jar.
How do I setup my project to package this dependency at the ear level rather
than putting it into the ejb?  There may be other ejbs and webapps in the
ear that also depend on this jar.

Should I specify it as a dependency of the ear with a scope of compile, and
then also specify it as a dependency of the ejb with a scope of provided?

Or is there a way to simply specify it at the ear level, and have the ejb
inherit it?  I've tried to make the ejb a child project of the ear but then
Maven complains that I've introduced a cyclic dependency.

I've searched for examples, but all of the ones I have seen don't address
the issue of packaging dependencies for an EJB at the ear level.

I would greatly appreciate any help.

Thanks,
Dave

Reply via email to