maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <>
Subject Re: How to ensure proper transitive dependencies
Date Fri, 03 Feb 2012 07:28:01 GMT
Hi Leon,

Leon Rosenberg wrote:

> On Thu, Feb 2, 2012 at 6:10 PM, Jörg Schaible
> <> wrote:
>> Leon Rosenberg wrote:
>>> Hello,
>>> I have following question, I don't quite understand how to solve
>>> properly. I have 3 projects, A,B and C.
>>> A depends on B and C, and B depends on C.
>>> A requires at least C version 1.06. However, after a while C got a new
>>> feature which is now used in B. So in my situation A contains:
>>> B version 2.0
>>> C version 1.0.6
>>> pom of B (2.0) contains
>>> C version 1.0.14
>>> When I build A, I'd expect 1.0.14 of C to be included through the
>>> dependency to B. However, the resulting war contains 1.0.6, which
>>> cause B 2.0 to malfunction, because it expects 1.0.14 of C.
>>> How can I resolve this issue, without manually version of C in the pom
>>> of A?
>> 3rd option:
>> Use a common parent and define the required versions of your dependencies
>> there in a dependencyManagement section.
>> - Jörg
> Thought about that, but since A,B,C are all own projects, and this
> situation is also common for further 10 projects, I would have to
> change the version of parent in all single project poms every week or
> so.... I think this will not solve the problem, but create a new one
> instead.

No, use the parent as an artifact on its own. Just because in your example 
e.g. B uses an old parent version (let's say 3), it does not mean that A and 
C can use a newer version (e.g. 5-SNAPSHOT).

- Jörg

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message