From easyant-commits-return-538-apmail-incubator-easyant-commits-archive=incubator.apache.org@incubator.apache.org Tue Sep 18 09:48:12 2012 Return-Path: X-Original-To: apmail-incubator-easyant-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-easyant-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E74CDDE62 for ; Tue, 18 Sep 2012 09:48:11 +0000 (UTC) Received: (qmail 35089 invoked by uid 500); 18 Sep 2012 09:48:11 -0000 Delivered-To: apmail-incubator-easyant-commits-archive@incubator.apache.org Received: (qmail 35057 invoked by uid 500); 18 Sep 2012 09:48:11 -0000 Mailing-List: contact easyant-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: easyant-dev@incubator.apache.org Delivered-To: mailing list easyant-commits@incubator.apache.org Received: (qmail 35036 invoked by uid 99); 18 Sep 2012 09:48:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Sep 2012 09:48:10 +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, 18 Sep 2012 09:48:09 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 1A8A423888E4; Tue, 18 Sep 2012 09:47:23 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1387074 - in /incubator/easyant/core/trunk/src/main/java/org/apache/ivy: ./ ant/ ant/EasyAntPluginBridge.java Date: Tue, 18 Sep 2012 09:47:23 -0000 To: easyant-commits@incubator.apache.org From: jlboudart@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120918094723.1A8A423888E4@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jlboudart Date: Tue Sep 18 09:47:22 2012 New Revision: 1387074 URL: http://svn.apache.org/viewvc?rev=1387074&view=rev Log: Add missing class EasyAntPluginBridge Added: incubator/easyant/core/trunk/src/main/java/org/apache/ivy/ incubator/easyant/core/trunk/src/main/java/org/apache/ivy/ant/ incubator/easyant/core/trunk/src/main/java/org/apache/ivy/ant/EasyAntPluginBridge.java Added: incubator/easyant/core/trunk/src/main/java/org/apache/ivy/ant/EasyAntPluginBridge.java URL: http://svn.apache.org/viewvc/incubator/easyant/core/trunk/src/main/java/org/apache/ivy/ant/EasyAntPluginBridge.java?rev=1387074&view=auto ============================================================================== --- incubator/easyant/core/trunk/src/main/java/org/apache/ivy/ant/EasyAntPluginBridge.java (added) +++ incubator/easyant/core/trunk/src/main/java/org/apache/ivy/ant/EasyAntPluginBridge.java Tue Sep 18 09:47:22 2012 @@ -0,0 +1,30 @@ +package org.apache.ivy.ant; + +import java.util.List; + +import org.apache.ivy.core.module.descriptor.DefaultModuleDescriptor; +import org.apache.ivy.core.module.descriptor.DependencyDescriptor; +import org.apache.ivy.core.settings.IvySettings; + +public class EasyAntPluginBridge { + + public static DefaultModuleDescriptor computeModuleDescriptor(DefaultModuleDescriptor md, IvySettings settings, + List dependencies, List conflicts, List excludes) { + for (IvyDependency dependency : dependencies) { + DependencyDescriptor dd = dependency.asDependencyDescriptor(md, "default", settings); + md.addDependency(dd); + } + + for (IvyExclude exclude : excludes) { + org.apache.ivy.core.module.descriptor.DefaultExcludeRule rule = exclude.asRule(settings); + rule.addConfiguration("default"); + md.addExcludeRule(rule); + } + + for (IvyConflict conflict : conflicts) { + conflict.addConflict(md, settings); + } + return md; + } + +}