[
http://jira.codehaus.org/browse/MNG-2205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=141086#action_141086
]
Alexandre Sauve commented on MNG-2205:
--------------------------------------
I think that 'provided' transitive dependencies are important! The case that
comes to my mind is OSGi and Eclipse development. You need a certain
class/package in order to compile your code; however that same package will be
available on the runtime environment as a bundle. You don't want to start
adding this jar as an embed library into your bundle! You want to embed only
those that are runtime/compile dependencies.
However since 'provided' is NOT transitive you would have to list all the
dependencies this bundle you depend on has in your POM! Not exactly a step
forward from Maven 1. You would like to pull in these bundle dependencies just
for the need of compilation (and actually you would what them in the manifest
file too).
So in the end for OSGi and Eclipse transitive provided dependencies would be a
really nice thing to have!
> "provided" scope dependencies must be transitive
> ------------------------------------------------
>
> Key: MNG-2205
> URL: http://jira.codehaus.org/browse/MNG-2205
> Project: Maven 2
> Issue Type: Bug
> Components: Dependencies
> Reporter: David Boden
> Priority: Critical
> Fix For: 2.1
>
>
> 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 A.
> Project C depends upon Project B. Project C declares a "compile" dependency
> on Project B.
> 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 contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira