maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dale Wijnand (JIRA)" <>
Subject [jira] (MNG-2205) "provided" scope dependencies must be transitive
Date Thu, 23 Feb 2012 16:11:03 GMT


Dale Wijnand commented on MNG-2205:

I really like the 3rd solution given by Sei Syvalta (

I'd like to vote that one in particular.

I think it would make for more stable builds (or rather updating dependencies), such as:
Dozer (net.sf.dozer:dozer:jar:5.3.2) currently depends on commons-lang:commons-lang:jar:2.5
If in my project I compile-time depend on dozer, I also have commons-lang on the compile classpath.
If I Dozer's next version refactors everything to use Google's Guava instead (,
then my code will break.. for something (basically) completely unrelated.
> "provided" scope dependencies must be transitive
> ------------------------------------------------
>                 Key: MNG-2205
>                 URL:
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>            Reporter: David Boden
>            Priority: Critical
>             Fix For: 3.x / Backlog
>         Attachments:
> A provided scope dependency can also be thought of as "compile-only".
> Project A requires Sybase JConnect on the runtime classpath. Project A declares a "provided"
dependency on Sybase JConnect.
> Project B depends upon Project A. Project B declares a "compile" dependency on Project
> Project C depends upon Project B. Project C declares a "compile" dependency on Project
> C
> | - compile dependency
> B
> | - compile dependency
> A
> | - provided dependency
> Sybase JConnect
> So, does Project C transitively depend on Sybase JConnect. Yes, of course! The "provided"
dependency needs to be transitive.
> Ultimately, when Project C gets deployed, Sybase JConnect needs to be somewhere on the
runtime classpath in order for the application to function. It's valid for Project C to assume
that Sybase JConnect is available and use JDBC all over the Project C code. Project C is safe
to do this because it can happily deduce that Sybase JConnect will be there in the runtime
environment because Project A NEEDS IT.
> I've got Use Cases all over my aggregated build which make it absolutely critical and
common sense that provided scope dependencies are transitive. For the (very rare) odd case
where you don't want to inherit provided dependencies, you can <exclude/> them.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message