incubator-npanday-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lars Corneliussen ...@lcorneliussen.de>
Subject Re: cannot get transitive dependencies working
Date Tue, 05 Apr 2011 16:57:55 GMT
Hi,

A transitive dependency is a dependeny of your dependency.

If you reference a class of that "transitive" dependency, it is not a 
dependency of your dependency anymore. It's now also your direct 
dependency and hence SHOULD be declared in the POM.

_
Lars

Am 05.04.11 18:32, schrieb Brett Porter:
> You're correct, and I think it is behaving as you expect.
>
> What I'm trying to be clear on (which is sometimes hard without pictures):
>
> Let's say B depends on C. Let's say your current project's source code uses classes from
all of A, B and C.
>
> You should declare all 3 dependencies, because you need to compile against them. You
shouldn't rely on not declaring C because B will bring it in - because B might later change
not to, or use a different version.
>
> Now, if you just use A, B - you only compile against A, B, but you run against A, B,
C (because B needs C to run).
>
> The problem in Java is if C contains an abstract class implemented in B, you need to
compile against C, even if you only use classes from A and B.
>
> :)
>
> On 06/04/2011, at 2:11 AM, Khai Do wrote:
>
>> Hi Brett.  Maybe I don't understand. What do you mean when you say ".NET is not burdened
the same way"?  As a best practice (for java projects) I follow the pattern of only referencing
top level modules and letting maven resolve all the transitive dependencies for me on compile.
 I believe this is the definition of dependency management.  It seems like your suggesting
that .NET is not build the same way and I shouldn't follow this pattern for npanday builds?
 Wouldn't this break maven's dependency management feature?  -Khai
>>
> --
> Brett Porter
> brett@apache.org
> http://brettporter.wordpress.com/
> http://au.linkedin.com/in/brettporter
>
>
>
>


Mime
View raw message