You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by hi...@apache.org on 2012/08/13 23:10:39 UTC

svn commit: r1372619 - in /ant/ivy/core/trunk: doc/use/ src/java/org/apache/ivy/ant/ src/java/org/apache/ivy/core/report/ test/java/org/apache/ivy/ant/

Author: hibou
Date: Mon Aug 13 21:10:39 2012
New Revision: 1372619

URL: http://svn.apache.org/viewvc?rev=1372619&view=rev
Log:
Implementation of a task which create an ivy.xml with fixed non transitive dependencies
Not sure how usefull it will be and how clean it is, so the doc is not linked into the toc, and no reference in the CHANGE.txt file

Added:
    ant/ivy/core/trunk/doc/use/fixdeps.html   (with props)
    ant/ivy/core/trunk/src/java/org/apache/ivy/ant/FixDepsTask.java   (with props)
    ant/ivy/core/trunk/test/java/org/apache/ivy/ant/FixDepsTaskTest.java   (with props)
    ant/ivy/core/trunk/test/java/org/apache/ivy/ant/ivy-transitive.xml   (with props)
Modified:
    ant/ivy/core/trunk/src/java/org/apache/ivy/ant/antlib.xml
    ant/ivy/core/trunk/src/java/org/apache/ivy/core/report/ResolveReport.java

Added: ant/ivy/core/trunk/doc/use/fixdeps.html
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/doc/use/fixdeps.html?rev=1372619&view=auto
==============================================================================
--- ant/ivy/core/trunk/doc/use/fixdeps.html (added)
+++ ant/ivy/core/trunk/doc/use/fixdeps.html Mon Aug 13 21:10:39 2012
@@ -0,0 +1,56 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.    
+-->
+<html>
+<head>
+	<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+	<script type="text/javascript">var xookiConfig = {level: 1};</script>	
+	<script type="text/javascript" src="../xooki/xooki.js"></script>
+</head>
+<body>
+	<textarea id="xooki-source">
+<span class="since">since 2.4</span>
+From some resolved dependencies against an ivy.xml, generate another ivy.xml which will have all transitive dependencies declared at the resolved revision.
+
+This task is usefull to always resolve the same set of dependencies. From an ivy.xml where dependencies are declared with ranges and the immediate required modules, <tt>fixdeps</tt> will produce an ivy.xml with all dependencies, with fixed versions, and no more transitive resolve to do.
+
+Nota Bene: this task is not suited to be used in a multi project environement where some dependencies still need to be maintained loose: the one between the projects.
+
+This is a [[ant:postresolvetask post resolve task]], with all the behaviour and attributes common to all post resolve tasks.
+
+<h1>Attributes</h1>
+<table class="ant">
+<thead>
+    <tr><th class="ant-att">Attribute</th><th class="ant-desc">Description</th><th class="ant-req">Required</th></tr>
+</thead>
+<tbody>
+    <tr><td>tofile</td><td>The location of the ivy file to generate</td>
+        <td>Yes</td></tr>
+</tbody>
+</table>
+
+<h1>Examples</h1>
+<code type="xml">
+<ivy:fixdeps tofile="ivy-fixed.xml" />
+</code>
+
+	</textarea>
+<script type="text/javascript">xooki.postProcess();</script>
+</body>
+</html>

Propchange: ant/ivy/core/trunk/doc/use/fixdeps.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ant/ivy/core/trunk/doc/use/fixdeps.html
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: ant/ivy/core/trunk/doc/use/fixdeps.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: ant/ivy/core/trunk/src/java/org/apache/ivy/ant/FixDepsTask.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/ant/FixDepsTask.java?rev=1372619&view=auto
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/ant/FixDepsTask.java (added)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/ant/FixDepsTask.java Mon Aug 13 21:10:39 2012
@@ -0,0 +1,57 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.ivy.ant;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.ivy.core.module.descriptor.ModuleDescriptor;
+import org.apache.ivy.core.report.ResolveReport;
+import org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorWriter;
+import org.apache.tools.ant.BuildException;
+
+public class FixDepsTask extends IvyPostResolveTask {
+
+    private File dest;
+
+    public void setToFile(File dest) {
+        this.dest = dest;
+    }
+
+    public void doExecute() throws BuildException {
+        prepareAndCheck();
+
+        if (dest == null) {
+            throw new BuildException("Missing required parameter 'tofile'");
+        }
+        if (dest.exists() && dest.isDirectory()) {
+            throw new BuildException("The destination file '" + dest.getAbsolutePath()
+                    + "' already exist and is a folder");
+        }
+
+        ResolveReport report = getResolvedReport();
+        ModuleDescriptor md = report.toFixedModuleDescriptor(getSettings());
+        try {
+            XmlModuleDescriptorWriter.write(md, dest);
+        } catch (IOException e) {
+            throw new BuildException("Failed to write into the file " + dest.getAbsolutePath()
+                    + " (" + e.getMessage() + ")", e);
+        }
+    }
+
+}

Propchange: ant/ivy/core/trunk/src/java/org/apache/ivy/ant/FixDepsTask.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ant/ivy/core/trunk/src/java/org/apache/ivy/ant/FixDepsTask.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: ant/ivy/core/trunk/src/java/org/apache/ivy/ant/FixDepsTask.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/ant/antlib.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/ant/antlib.xml?rev=1372619&r1=1372618&r2=1372619&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/ant/antlib.xml (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/ant/antlib.xml Mon Aug 13 21:10:39 2012
@@ -46,4 +46,5 @@
 	<taskdef name="cleancache" classname="org.apache.ivy.ant.IvyCleanCache"/>
     <taskdef name="buildobr" classname="org.apache.ivy.ant.BuildBundleRepoDescriptorTask" />
     <taskdef name="convertmanifest" classname="org.apache.ivy.ant.ConvertManifestTask" />
+    <taskdef name="fixdeps" classname="org.apache.ivy.ant.FixDepsTask" />
 </antlib>

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/core/report/ResolveReport.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/report/ResolveReport.java?rev=1372619&r1=1372618&r2=1372619&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/core/report/ResolveReport.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/core/report/ResolveReport.java Mon Aug 13 21:10:39 2012
@@ -21,6 +21,7 @@ import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
+import java.util.Date;
 import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.LinkedHashSet;
@@ -28,11 +29,21 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.ivy.core.cache.ResolutionCacheManager;
+import org.apache.ivy.core.module.descriptor.Configuration;
+import org.apache.ivy.core.module.descriptor.DefaultDependencyDescriptor;
+import org.apache.ivy.core.module.descriptor.DefaultModuleDescriptor;
+import org.apache.ivy.core.module.descriptor.DependencyArtifactDescriptor;
+import org.apache.ivy.core.module.descriptor.DependencyDescriptor;
+import org.apache.ivy.core.module.descriptor.ExcludeRule;
+import org.apache.ivy.core.module.descriptor.IncludeRule;
 import org.apache.ivy.core.module.descriptor.ModuleDescriptor;
+import org.apache.ivy.core.module.id.ArtifactId;
 import org.apache.ivy.core.module.id.ModuleId;
 import org.apache.ivy.core.module.id.ModuleRevisionId;
 import org.apache.ivy.core.resolve.IvyNode;
 import org.apache.ivy.core.resolve.ResolveOptions;
+import org.apache.ivy.core.settings.IvySettings;
+import org.apache.ivy.plugins.namespace.Namespace;
 import org.apache.ivy.plugins.report.ReportOutputter;
 import org.apache.ivy.util.filter.Filter;
 
@@ -252,7 +263,7 @@ public class ResolveReport {
      * 
      * @return The list of all dependencies.
      */
-    public List getDependencies() {
+    public List/* <IvyNode> */getDependencies() {
         return dependencies;
     }
 
@@ -262,7 +273,7 @@ public class ResolveReport {
      * 
      * @return The list of all artifacts.
      */
-    public List getArtifacts() {
+    public List/* <Artifact> */getArtifacts() {
         return artifacts;
     }
 
@@ -321,4 +332,36 @@ public class ResolveReport {
         return resolveId;
     }
 
+    public ModuleDescriptor toFixedModuleDescriptor(IvySettings settings) {
+        DefaultModuleDescriptor fixedmd = new DefaultModuleDescriptor(md.getModuleRevisionId(),
+                md.getStatus(), new Date());
+
+        // copy configurations
+        String[] resolvedConf = getConfigurations();
+        for (int i = 0; i < resolvedConf.length; i++) {
+            Configuration conf = md.getConfiguration(resolvedConf[i]);
+            fixedmd.addConfiguration(conf);
+        }
+
+        // get dependencies
+        for (int i = 0; i < dependencies.size(); i++) {
+            IvyNode node = (IvyNode) dependencies.get(i);
+            if (node.getAllArtifacts().length == 0) {
+                // no artifact: it was probably useful transitively, hence it is useless here
+                continue;
+            }
+            DefaultDependencyDescriptor dep = new DefaultDependencyDescriptor(fixedmd,
+                    node.getResolvedId(), true, false, false);
+            String[] rootConfs = node.getRootModuleConfigurations();
+            for (int j = 0; j < rootConfs.length; j++) {
+                String[] targetConfs = node.getConfigurations(rootConfs[j]);
+                for (int k = 0; k < targetConfs.length; k++) {
+                    dep.addDependencyConfiguration(rootConfs[j], targetConfs[k]);
+                }
+            }
+            fixedmd.addDependency(dep);
+        }
+
+        return fixedmd;
+    }
 }

Added: ant/ivy/core/trunk/test/java/org/apache/ivy/ant/FixDepsTaskTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/ant/FixDepsTaskTest.java?rev=1372619&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/ant/FixDepsTaskTest.java (added)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/ant/FixDepsTaskTest.java Mon Aug 13 21:10:39 2012
@@ -0,0 +1,227 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.ivy.ant;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import junit.framework.TestCase;
+
+import org.apache.ivy.core.module.descriptor.ModuleDescriptor;
+import org.apache.ivy.core.settings.IvySettings;
+import org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.taskdefs.Delete;
+
+public class FixDepsTaskTest extends TestCase {
+
+    private File cache;
+
+    private FixDepsTask fixDeps;
+
+    private Project project;
+
+    protected void setUp() throws Exception {
+        createCache();
+        project = new Project();
+        project.setProperty("ivy.settings.file", "test/repositories/ivysettings.xml");
+
+        fixDeps = new FixDepsTask();
+        fixDeps.setProject(project);
+        System.setProperty("ivy.cache.dir", cache.getAbsolutePath());
+    }
+
+    private void createCache() {
+        cache = new File("build/cache");
+        cache.mkdirs();
+    }
+
+    protected void tearDown() throws Exception {
+        cleanCache();
+    }
+
+    private void cleanCache() {
+        Delete del = new Delete();
+        del.setProject(new Project());
+        del.setDir(cache);
+        del.execute();
+    }
+
+    public void testSimple() throws Exception {
+        project.setProperty("ivy.dep.file", "test/java/org/apache/ivy/ant/ivy-simple.xml");
+
+        File dest = new File("build/testFixDeps/testSimple.xml");
+        fixDeps.setToFile(dest);
+        fixDeps.execute();
+
+        assertTrue(dest.exists());
+        ModuleDescriptor md = XmlModuleDescriptorParser.getInstance().parseDescriptor(
+            new IvySettings(), dest.toURI().toURL(), true);
+        assertEquals("apache", md.getModuleRevisionId().getOrganisation());
+        assertEquals("resolve-simple", md.getModuleRevisionId().getName());
+        assertEquals("1.0", md.getModuleRevisionId().getRevision());
+        assertEquals("release", md.getStatus());
+
+        assertEquals(1, md.getConfigurations().length);
+        assertEquals("default", md.getConfigurations()[0].getName());
+        assertEquals(0, md.getConfigurations()[0].getExtends().length);
+
+        assertEquals(1, md.getDependencies().length);
+        assertEquals("org1", md.getDependencies()[0].getDependencyId().getOrganisation());
+        assertEquals("mod1.2", md.getDependencies()[0].getDependencyId().getName());
+        assertEquals(false, md.getDependencies()[0].isChanging());
+        assertEquals(true, md.getDependencies()[0].isForce());
+        assertEquals(false, md.getDependencies()[0].isTransitive());
+        assertEquals("2.0", md.getDependencies()[0].getDependencyRevisionId().getRevision());
+    }
+
+    public void testMulticonf() throws Exception {
+        project.setProperty("ivy.dep.file", "test/java/org/apache/ivy/ant/ivy-multiconf.xml");
+
+        File dest = new File("build/testFixDeps/testMultiConf.xml");
+        fixDeps.setToFile(dest);
+        fixDeps.execute();
+
+        assertTrue(dest.exists());
+        ModuleDescriptor md = XmlModuleDescriptorParser.getInstance().parseDescriptor(
+            new IvySettings(), dest.toURI().toURL(), true);
+        assertEquals("apache", md.getModuleRevisionId().getOrganisation());
+        assertEquals("resolve-simple", md.getModuleRevisionId().getName());
+        assertEquals("1.0", md.getModuleRevisionId().getRevision());
+        assertEquals("release", md.getStatus());
+
+        assertEquals(2, md.getConfigurations().length);
+        assertEquals("default", md.getConfigurations()[0].getName());
+        assertEquals(0, md.getConfigurations()[0].getExtends().length);
+        assertEquals("compile", md.getConfigurations()[1].getName());
+        assertEquals(0, md.getConfigurations()[1].getExtends().length);
+
+        assertEquals(2, md.getDependencies().length);
+
+        assertEquals("org1", md.getDependencies()[0].getDependencyId().getOrganisation());
+        assertEquals("mod1.2", md.getDependencies()[0].getDependencyId().getName());
+        assertEquals(false, md.getDependencies()[0].isChanging());
+        assertEquals(true, md.getDependencies()[0].isForce());
+        assertEquals(false, md.getDependencies()[0].isTransitive());
+        assertEquals("2.0", md.getDependencies()[0].getDependencyRevisionId().getRevision());
+        assertEquals(1, md.getDependencies()[0].getModuleConfigurations().length);
+        assertEquals("default", md.getDependencies()[0].getModuleConfigurations()[0]);
+        assertEquals(1, md.getDependencies()[0].getDependencyConfigurations("default").length);
+        assertEquals("default", md.getDependencies()[0].getDependencyConfigurations("default")[0]);
+
+        assertEquals("org1", md.getDependencies()[1].getDependencyId().getOrganisation());
+        assertEquals("mod1.1", md.getDependencies()[1].getDependencyId().getName());
+        assertEquals(false, md.getDependencies()[1].isChanging());
+        assertEquals(true, md.getDependencies()[1].isForce());
+        assertEquals(false, md.getDependencies()[1].isTransitive());
+        assertEquals("2.0", md.getDependencies()[1].getDependencyRevisionId().getRevision());
+        assertEquals(1, md.getDependencies()[1].getModuleConfigurations().length);
+        assertEquals("compile", md.getDependencies()[1].getModuleConfigurations()[0]);
+        assertEquals(1, md.getDependencies()[1].getDependencyConfigurations("compile").length);
+        assertEquals("default", md.getDependencies()[1].getDependencyConfigurations("compile")[0]);
+    }
+
+    public void testTransitivity() throws Exception {
+        project.setProperty("ivy.dep.file", "test/java/org/apache/ivy/ant/ivy-transitive.xml");
+
+        File dest = new File("build/testFixDeps/testTransitivity.xml");
+        fixDeps.setToFile(dest);
+        fixDeps.execute();
+
+        assertTrue(dest.exists());
+        ModuleDescriptor md = XmlModuleDescriptorParser.getInstance().parseDescriptor(
+            new IvySettings(), dest.toURI().toURL(), true);
+        assertEquals("apache", md.getModuleRevisionId().getOrganisation());
+        assertEquals("resolve-simple", md.getModuleRevisionId().getName());
+        assertEquals("1.0", md.getModuleRevisionId().getRevision());
+        assertEquals("release", md.getStatus());
+
+        assertEquals(2, md.getConfigurations().length);
+        assertEquals("default", md.getConfigurations()[0].getName());
+        assertEquals(0, md.getConfigurations()[0].getExtends().length);
+        assertEquals("compile", md.getConfigurations()[1].getName());
+        assertEquals(0, md.getConfigurations()[1].getExtends().length);
+
+        assertEquals(3, md.getDependencies().length);
+
+        assertEquals("org1", md.getDependencies()[0].getDependencyId().getOrganisation());
+        assertEquals("mod1.2", md.getDependencies()[0].getDependencyId().getName());
+        assertEquals(false, md.getDependencies()[0].isChanging());
+        assertEquals(true, md.getDependencies()[0].isForce());
+        assertEquals(false, md.getDependencies()[0].isTransitive());
+        assertEquals("2.0", md.getDependencies()[0].getDependencyRevisionId().getRevision());
+        assertEquals(1, md.getDependencies()[0].getModuleConfigurations().length);
+        assertEquals("default", md.getDependencies()[0].getModuleConfigurations()[0]);
+        assertEquals(1, md.getDependencies()[0].getDependencyConfigurations("default").length);
+        assertEquals("default", md.getDependencies()[0].getDependencyConfigurations("default")[0]);
+
+        assertEquals("org1", md.getDependencies()[1].getDependencyId().getOrganisation());
+        assertEquals("mod1.1", md.getDependencies()[1].getDependencyId().getName());
+        assertEquals(false, md.getDependencies()[1].isChanging());
+        assertEquals(true, md.getDependencies()[1].isForce());
+        assertEquals(false, md.getDependencies()[1].isTransitive());
+        assertEquals("2.0", md.getDependencies()[1].getDependencyRevisionId().getRevision());
+        assertEquals(1, md.getDependencies()[1].getModuleConfigurations().length);
+        assertEquals("compile", md.getDependencies()[1].getModuleConfigurations()[0]);
+        assertEquals(1, md.getDependencies()[1].getDependencyConfigurations("compile").length);
+        assertEquals("default", md.getDependencies()[1].getDependencyConfigurations("compile")[0]);
+
+        assertEquals("org1", md.getDependencies()[2].getDependencyId().getOrganisation());
+        assertEquals("mod1.2", md.getDependencies()[2].getDependencyId().getName());
+        assertEquals(false, md.getDependencies()[2].isChanging());
+        assertEquals(true, md.getDependencies()[2].isForce());
+        assertEquals(false, md.getDependencies()[2].isTransitive());
+        assertEquals("2.1", md.getDependencies()[2].getDependencyRevisionId().getRevision());
+        assertEquals(1, md.getDependencies()[2].getModuleConfigurations().length);
+        assertEquals("compile", md.getDependencies()[2].getModuleConfigurations()[0]);
+        assertEquals(1, md.getDependencies()[2].getDependencyConfigurations("compile").length);
+        assertEquals("*", md.getDependencies()[2].getDependencyConfigurations("compile")[0]);
+    }
+
+    public void testFixedResolve() throws Exception {
+        project.setProperty("ivy.dep.file", "test/java/org/apache/ivy/ant/ivy-transitive.xml");
+
+        File dest = new File("build/testFixDeps/testTransitivity.xml");
+        fixDeps.setToFile(dest);
+        fixDeps.execute();
+
+        project.setProperty("ivy.dep.file", dest.getAbsolutePath());
+        File dest2 = new File("build/testFixDeps/testTransitivity2.xml");
+        fixDeps.setToFile(dest2);
+        fixDeps.execute();
+
+        ModuleDescriptor md1 = XmlModuleDescriptorParser.getInstance().parseDescriptor(
+            new IvySettings(), dest.toURI().toURL(), true);
+        ModuleDescriptor md2 = XmlModuleDescriptorParser.getInstance().parseDescriptor(
+            new IvySettings(), dest2.toURI().toURL(), true);
+        assertEquals(md1, md2);
+        assertEquals(Arrays.asList(md1.getConfigurations()), Arrays.asList(md2.getConfigurations()));
+        assertEquals(toString(Arrays.asList(md1.getDependencies())),
+            toString(Arrays.asList(md2.getDependencies())));
+    }
+
+    private List/* <String> */toString(List list) {
+        List strings = new ArrayList(list.size());
+        for (int i = 0; i < list.size(); i++) {
+            strings.add(list.get(i).toString());
+        }
+        return strings;
+    }
+}

Propchange: ant/ivy/core/trunk/test/java/org/apache/ivy/ant/FixDepsTaskTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ant/ivy/core/trunk/test/java/org/apache/ivy/ant/FixDepsTaskTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: ant/ivy/core/trunk/test/java/org/apache/ivy/ant/FixDepsTaskTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ant/ivy/core/trunk/test/java/org/apache/ivy/ant/ivy-transitive.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/ant/ivy-transitive.xml?rev=1372619&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/ant/ivy-transitive.xml (added)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/ant/ivy-transitive.xml Mon Aug 13 21:10:39 2012
@@ -0,0 +1,35 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.    
+-->
+<ivy-module version="1.0"> 
+	<info organisation="apache"
+	       module="resolve-simple"
+	       revision="1.0"
+	       status="release"
+	>
+        <description>Demonstrates configuration-specific dependencies</description>
+    </info>
+	<configurations>
+		<conf name="default" />
+		<conf name="compile" />
+	</configurations>
+	<dependencies>
+		<dependency org="org1" name="mod1.2" rev="2.0" conf="default" />
+		<dependency org="org1" name="mod1.1" rev="2.0" conf="compile->default" />
+	</dependencies>
+</ivy-module>

Propchange: ant/ivy/core/trunk/test/java/org/apache/ivy/ant/ivy-transitive.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ant/ivy/core/trunk/test/java/org/apache/ivy/ant/ivy-transitive.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: ant/ivy/core/trunk/test/java/org/apache/ivy/ant/ivy-transitive.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml