From npanday-users-return-79-apmail-incubator-npanday-users-archive=incubator.apache.org@incubator.apache.org Tue Apr 05 16:58:23 2011 Return-Path: Delivered-To: apmail-incubator-npanday-users-archive@minotaur.apache.org Received: (qmail 85015 invoked from network); 5 Apr 2011 16:58:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 Apr 2011 16:58:23 -0000 Received: (qmail 56232 invoked by uid 500); 5 Apr 2011 16:58:23 -0000 Delivered-To: apmail-incubator-npanday-users-archive@incubator.apache.org Received: (qmail 56211 invoked by uid 500); 5 Apr 2011 16:58:23 -0000 Mailing-List: contact npanday-users-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: npanday-users@incubator.apache.org Delivered-To: mailing list npanday-users@incubator.apache.org Received: (qmail 56202 invoked by uid 99); 5 Apr 2011 16:58:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Apr 2011 16:58:23 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [80.67.18.43] (HELO smtprelay01.ispgateway.de) (80.67.18.43) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Apr 2011 16:58:16 +0000 Received: from [88.208.188.67] (helo=maccorneliussen.dhcp-un.itemis.de) by smtprelay01.ispgateway.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1Q79Zj-0001P6-T9 for npanday-users@incubator.apache.org; Tue, 05 Apr 2011 18:57:56 +0200 Message-ID: <4D9B4A13.5070907@lcorneliussen.de> Date: Tue, 05 Apr 2011 18:57:55 +0200 From: Lars Corneliussen User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: npanday-users@incubator.apache.org Subject: Re: cannot get transitive dependencies working References: <0055CE69D94919458617273479AB71A9DABE97C61C@MBX7.EXCHPROD.USA.NET> <0055CE69D94919458617273479AB71A9DABE97C6E2@MBX7.EXCHPROD.USA.NET> <4D9B1A85.7040609@lcorneliussen.de> <0055CE69D94919458617273479AB71A9DABEA211C0@MBX7.EXCHPROD.USA.NET> <0055CE69D94919458617273479AB71A9DABEA21250@MBX7.EXCHPROD.USA.NET> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Df-Sender: me@lcorneliussen.de X-Virus-Checked: Checked by ClamAV on apache.org 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 > > > >