The managing of Child A doesn't necessarily mean that Child A's dependencies are weighed higher than other direct dependencies. Also, given the same depth in the tree, the first version processed for a given group:artifact wins...ie the order in the pom can have subtle impacts.
On Mon, Sep 28, 2009 at 8:54 PM, Paul Benedict <[email protected]> wrote: > I have a project structure like this: > > Parent A > * Declares managed dependency org.slf4j:slf4j-api:1.5.8 > * Declares managed dependency org.hibernate:hibernate-core:3.3.1.GA > * Declares managed dependency org.hibernate:hibernate-annotations:3.4.0.GA > Child A > * Depends on org.hibernate:hibernate-core > * Depends on org.hibernate:hibernate-annotations > > When I run dependency:list for Child A, I see that version > org.slf4j:slf4j-api:1.5.8 is selected. This is expected and correct because: > 1) hibernate-core relies on 1.5.2 (loses) > 2) hibernate-annotations depends on 1.4.2 (loses) > 3) My managed version wins > > Now here is my second project: > > Parent B > * Declares managed dependency Child A > * Declares managed dependency org.hibernate:hibernate-core:3.3.1.GA > * Declares managed dependency org.hibernate:hibernate-annotations:3.4.0.GA > Child B > * Depends on Child A > * Depends on org.hibernate:hibernate-core > * Depends on org.hibernate:hibernate-annotations > > When I run dependency:list for Child B, I see that version > org.slf4j:slf4j-api:1.5.2 is selected. > > Why wouldn't the managed dependency from Child A win? > > Paul > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
