incubator-ivy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xav...@apache.org
Subject svn commit: r577708 - in /incubator/ivy/core/trunk: CHANGES.txt src/java/org/apache/ivy/core/resolve/ResolveEngine.java test/java/org/apache/ivy/ant/IvyDeliverTest.java test/java/org/apache/ivy/ant/ivy-dyn-evicted.xml
Date Thu, 20 Sep 2007 12:09:01 GMT
Author: xavier
Date: Thu Sep 20 05:09:00 2007
New Revision: 577708

URL: http://svn.apache.org/viewvc?rev=577708&view=rev
Log:
FIX: Static revision replacement is not working when a dynamic revision is evicted by a transitive
dependency (IVY-603) (with contribution from Matthias Kilian)

Added:
    incubator/ivy/core/trunk/test/java/org/apache/ivy/ant/ivy-dyn-evicted.xml   (with props)
Modified:
    incubator/ivy/core/trunk/CHANGES.txt
    incubator/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveEngine.java
    incubator/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyDeliverTest.java

Modified: incubator/ivy/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/CHANGES.txt?rev=577708&r1=577707&r2=577708&view=diff
==============================================================================
--- incubator/ivy/core/trunk/CHANGES.txt (original)
+++ incubator/ivy/core/trunk/CHANGES.txt Thu Sep 20 05:09:00 2007
@@ -51,6 +51,7 @@
 
    version in SVN
 =====================================
+- FIX: Static revision replacement is not working when a dynamic revision is evicted by a
transitive dependency (IVY-603) (with contribution from Matthias Kilian)
 - FIX: NullPointerException whilst resolving transitive dependencies (IVY-590)
 - FIX: cachepath based on a resolve done in a previous build broken (IVY-583)
 - FIX: Resolving dynamic version fails when using multiple patterns if only one pattern find
a revision and others don't (IVY-602)

Modified: incubator/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveEngine.java
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveEngine.java?rev=577708&r1=577707&r2=577708&view=diff
==============================================================================
--- incubator/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveEngine.java (original)
+++ incubator/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveEngine.java Thu Sep
20 05:09:00 2007
@@ -247,7 +247,7 @@
             if (dependencies.length > 0) {
                 IvyNode root = dependencies[0].getRoot();
                 for (int i = 0; i < dependencies.length; i++) {
-                    if (!dependencies[i].isCompletelyEvicted() && !dependencies[i].hasProblem())
{
+                    if (!dependencies[i].hasProblem()) {
                         DependencyDescriptor dd = dependencies[i].getDependencyDescriptor(root);
                         if (dd != null) {
                             String rev = dependencies[i].getResolvedId().getRevision();

Modified: incubator/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyDeliverTest.java
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyDeliverTest.java?rev=577708&r1=577707&r2=577708&view=diff
==============================================================================
--- incubator/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyDeliverTest.java (original)
+++ incubator/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyDeliverTest.java Thu Sep 20 05:09:00
2007
@@ -234,6 +234,31 @@
                 .getDependencyRevisionId());
     }
 
+    public void testWithDynEvicted() throws Exception {
+        project.setProperty("ivy.dep.file", "test/java/org/apache/ivy/ant/ivy-dyn-evicted.xml");
+        IvyResolve res = new IvyResolve();
+        res.setValidate(false);
+        res.setProject(project);
+        res.execute();
+        
+        deliver.setPubrevision("1.2");
+        deliver.setDeliverpattern("build/test/deliver/ivy-[revision].xml");
+        deliver.setValidate(false);
+        deliver.execute();
+        
+        // should have done the ivy delivering
+        File deliveredIvyFile = new File("build/test/deliver/ivy-1.2.xml");
+        assertTrue(deliveredIvyFile.exists()); 
+        ModuleDescriptor md = XmlModuleDescriptorParser.getInstance().parseDescriptor(
+	    new IvySettings(), deliveredIvyFile.toURL(), false);
+        assertEquals(ModuleRevisionId.newInstance("apache", "resolve-latest", "1.2"), 
+            md.getModuleRevisionId());
+        DependencyDescriptor[] dds = md.getDependencies();
+        assertEquals(2, dds.length);
+        assertEquals(ModuleRevisionId.newInstance("org1", "mod1.2", "1.1"), 
+            dds[0].getDependencyRevisionId());
+    }
+
     public void testReplaceImportedConfigurations() throws Exception {
         project.setProperty("ivy.dep.file", "test/java/org/apache/ivy/ant/ivy-import-confs.xml");
         IvyResolve res = new IvyResolve();

Added: incubator/ivy/core/trunk/test/java/org/apache/ivy/ant/ivy-dyn-evicted.xml
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/test/java/org/apache/ivy/ant/ivy-dyn-evicted.xml?rev=577708&view=auto
==============================================================================
--- incubator/ivy/core/trunk/test/java/org/apache/ivy/ant/ivy-dyn-evicted.xml (added)
+++ incubator/ivy/core/trunk/test/java/org/apache/ivy/ant/ivy-dyn-evicted.xml Thu Sep 20 05:09:00
2007
@@ -0,0 +1,11 @@
+<ivy-module version="1.0"> 
+	<info organisation="apache"
+	       module="resolve-latest"
+	       revision="1.0"
+	       status="release"
+	/>
+	<dependencies>
+		<dependency org="org1" name="mod1.2" rev="1+" />
+		<dependency org="org6" name="mod6.1" rev="2.0" />
+	</dependencies>
+</ivy-module>

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



Mime
View raw message