On 1/9/06, Wendy Smoak <[EMAIL PROTECTED]> wrote:
On 1/9/06, Sean Schofield <[EMAIL PROTECTED]> wrote:

>  How would it distinguish
> what was an actual dependency vs. what dependency was used in 4 out of
> 6 subprojects?

Assuming you're talking about <dependencyManagement>, things in that
section don't have any effect until they are declared in
<dependencies> by a module.  At that point, you can take advantage of
the inheritance and leave out the version number and (I think) scope.

That's right.  So it would be safe to put things like Servlet API, JUnit (or anything else that didn't get picked up automatically as a transitive dependency) into the parent POM's <dependencyManagement> section.  The child projects would then reference these dependencyManagement entries by groupId and artifactId, omitting the version for sure, and also scope, although inheriting the scope seemed broken in the lead-up to Maven 2.0 final but I think it's fixed now. :-)

Kind Regards,
John Fallows.

--
Author Pro JSF and Ajax: Building Rich Internet Components
http://www.apress.com/book/bookDisplay.html?bID=10044

Reply via email to