Return-Path: X-Original-To: apmail-buildr-commits-archive@www.apache.org Delivered-To: apmail-buildr-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 013EED811 for ; Tue, 11 Dec 2012 19:19:06 +0000 (UTC) Received: (qmail 71067 invoked by uid 500); 11 Dec 2012 19:19:05 -0000 Delivered-To: apmail-buildr-commits-archive@buildr.apache.org Received: (qmail 71034 invoked by uid 500); 11 Dec 2012 19:19:05 -0000 Mailing-List: contact commits-help@buildr.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@buildr.apache.org Delivered-To: mailing list commits@buildr.apache.org Received: (qmail 71025 invoked by uid 99); 11 Dec 2012 19:19:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Dec 2012 19:19:05 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Dec 2012 19:19:03 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 4C80C2388906; Tue, 11 Dec 2012 19:18:42 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1420335 - /buildr/trunk/lib/buildr/java/pom.rb Date: Tue, 11 Dec 2012 19:18:41 -0000 To: commits@buildr.apache.org From: donaldp@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121211191842.4C80C2388906@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: donaldp Date: Tue Dec 11 19:18:40 2012 New Revision: 1420335 URL: http://svn.apache.org/viewvc?rev=1420335&view=rev Log: Update the POM dependency traversal code so that; * excluded dependencies do not get traversed and then excluded but are excluded prior to loading the dependencies POM file * inability to load a dependencies POM does not result in failure but it is assumed that the dependency does not have a POM Modified: buildr/trunk/lib/buildr/java/pom.rb Modified: buildr/trunk/lib/buildr/java/pom.rb URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/java/pom.rb?rev=1420335&r1=1420334&r2=1420335&view=diff ============================================================================== --- buildr/trunk/lib/buildr/java/pom.rb (original) +++ buildr/trunk/lib/buildr/java/pom.rb Tue Dec 11 19:18:40 2012 @@ -99,15 +99,14 @@ module Buildr apply = managed(spec) spec = apply.merge(spec) if apply + next if options[:exclusions] && options[:exclusions].any? { |ex| dep['groupId'] == ex['groupId'] && dep['artifactId'] == ex['artifactId'] } + # calculate transitive dependencies if options[:scopes].include?(spec[:scope]) spec.delete(:scope) exclusions = dep["exclusions"].first["exclusion"] rescue nil - transitive_deps = POM.load(spec).dependencies(options[:scopes_transitive] || SCOPES_TRANSITIVE) - transitive_deps = transitive_deps.reject{|dep| - exclusions.find {|ex| dep.index("#{ex['groupId'].first}:#{ex['artifactId'].first}:") == 0} - } if exclusions + transitive_deps = POM.load(spec).dependencies(:exclusions => exclusions, :scopes => (options[:scopes_transitive] || SCOPES_TRANSITIVE) ) rescue [] [Artifact.to_spec(spec)] + transitive_deps end