You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by xa...@apache.org on 2008/07/04 13:16:12 UTC

svn commit: r674011 - in /ant/ivy/core/trunk: CHANGES.txt test/java/org/apache/ivy/ant/IvyRetrieveTest.java

Author: xavier
Date: Fri Jul  4 04:16:12 2008
New Revision: 674011

URL: http://svn.apache.org/viewvc?rev=674011&view=rev
Log:
FIX: Ivy files are not retrieved when using useOrigin=true (IVY-713)

Modified:
    ant/ivy/core/trunk/CHANGES.txt
    ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyRetrieveTest.java

Modified: ant/ivy/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=674011&r1=674010&r2=674011&view=diff
==============================================================================
--- ant/ivy/core/trunk/CHANGES.txt (original)
+++ ant/ivy/core/trunk/CHANGES.txt Fri Jul  4 04:16:12 2008
@@ -91,6 +91,7 @@
 - IMPROVEMENT: Change allownomd and skipbuildwithoutivy into a more semantically correct name (IVY-297)
 - IMPROVEMENT: Smarter determination if an expression is exact or not for RegexpPatternMatcher and GlobPatternMatcher
 
+- FIX: Ivy files are not retrieved when using useOrigin=true (IVY-713)
 - FIX: NPE in Ivy:install task if the repository cache dir has been cleared (IVY-843)
 - FIX: Maven version ranges with ( ) are not supported (IVY-678) (thanks to Michael Kebe)
 - FIX: Ignore maven metadata files when listing revisions (IVY-765)

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyRetrieveTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyRetrieveTest.java?rev=674011&r1=674010&r2=674011&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyRetrieveTest.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyRetrieveTest.java Fri Jul  4 04:16:12 2008
@@ -218,6 +218,27 @@
             "mod1.2", "jar", "jar")).exists());
     }
     
+    public void testUseOriginWithIvyPattern() throws Exception {
+        // mod2.5 depends on virtual mod2.3 which depends on mod2.1 which depends on mod1.1 which
+        // depends on mod1.2
+        project.setProperty("ivy.dep.file", "test/repositories/1/org2/mod2.5/ivys/ivy-0.6.1.xml");
+
+        String ivyPattern = IVY_RETRIEVE_PATTERN;
+
+        retrieve.setIvypattern(ivyPattern);
+        retrieve.setUseOrigin(true);
+        retrieve.execute();
+
+        assertTrue(new File(IvyPatternHelper.substitute(ivyPattern, "org2", "mod2.3", "0.4.1",
+            "ivy", "ivy", "xml")).exists());
+        assertTrue(new File(IvyPatternHelper.substitute(ivyPattern, "org2", "mod2.1", "0.3", "ivy",
+            "ivy", "xml")).exists());
+        assertTrue(new File(IvyPatternHelper.substitute(ivyPattern, "org1", "mod1.1", "1.0", "ivy",
+            "ivy", "xml")).exists());
+        assertFalse(new File(IvyPatternHelper.substitute(ivyPattern, "org1", "mod1.2", "2.0",
+            "ivy", "ivy", "xml")).exists());
+    }
+    
     public void testRetrieveWithOriginalNamePattern() throws Exception {
         retrieve.setFile(new File("test/java/org/apache/ivy/ant/ivy-631.xml"));
         retrieve.setConf("default");