maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Crosmarie <graham.crosma...@linagora.com>
Subject Duplicate dependency with different scopes
Date Tue, 17 Jul 2012 07:15:05 GMT
Hello,

I have a problem with my dependency pattern and I am not sure that maven 
behaves correctly in this case.

Here is my case :
     - I am using Maven 2.2.1.
     - I have a project A which defines a dependency D with scope test.
     - I have a project B whose parent is A and which defines D as a 
dependency in scope compile.
     - My project hierarchy defines a lot of projects whose parent is A 
and who have B as a dependency.

My problem is : all these "subprojects" have D as dependency in scope 
test (from A).
I think that the correct behaviour would be to have D with scope compile 
(from their dependency on B) because scope compile 'contains' scope 
test. But Maven 2.2.1 does not work that way :-).

Is there any way to force my projects to use the D scope from project B 
instead of the one from its parent (project A) ?

Thanks in avance,

-- 
Signature
Graham CROSMARIE
R&D Engineer
Linagora GSO -- www.linagora.com <http://www.linagora.com>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message