FIX: Ivy retrieve does not honor validate="false" from ivysettings (IVY-992)
authorMaarten Coene <maartenc@apache.org>
Fri, 13 Feb 2009 11:39:48 +0000 (11:39 +0000)
committerMaarten Coene <maartenc@apache.org>
Fri, 13 Feb 2009 11:39:48 +0000 (11:39 +0000)
git-svn-id: https://svn.apache.org/repos/asf/ant/ivy/core/trunk@744087 13f79535-47bb-0310-9956-ffa450edef68

CHANGES.txt
src/java/org/apache/ivy/ant/IvyPostResolveTask.java
test/java/org/apache/ivy/ant/IvyRetrieveTest.java

index 15d4143..f86d4c5 100644 (file)
@@ -95,6 +95,7 @@ for detailed view of each issue, please consult http://issues.apache.org/jira/br
 - IMPROVEMENT: Error message is not clear when specifying an invalid value for checksums (IVY-977)
 - IMPROVEMENT: catch AccessControlException on System.getProperties() (IVY-1015)
 
+- FIX: Ivy retrieve does not honor validate="false" from ivysettings (IVY-992)
 - FIX: Snapshot issues when using ibiblio resolver with m2compatible is false (IVY-1028)
 - FIX: Ivy Standalone hangs after publishing to SSH resolver (IVY-1009)
 - FIX: overwrite='false' completely prevents publishing into url repositories (IVY-1007)
index dcca7c4..acc57f2 100644 (file)
@@ -288,7 +288,7 @@ public abstract class IvyPostResolveTask extends IvyTask {
         resolve.setProject(getProject());
         resolve.setHaltonfailure(haltOnFailure);
         resolve.setUseOrigin(useOrigin);
-        resolve.setValidate(isValidate());
+        resolve.setValidate(doValidate(getSettings()));
         resolve.setKeep(isKeep());
         resolve.setRefresh(isRefresh());
         resolve.setLog(getLog());
index 84e5440..cc421a6 100644 (file)
@@ -80,6 +80,16 @@ public class IvyRetrieveTest extends TestCase {
             "mod3.2", "jar", "jar", "private")).exists());
     }
 
+    public void testValidateInIvySettings() throws Exception {
+        // cfr IVY-992
+        project.setProperty("ivy.dep.file", "test/java/org/apache/ivy/ant/ivy-latest-extra.xml");
+        retrieve.getSettings().setValidate(false);
+        retrieve.execute();
+        
+        assertTrue(new File(IvyPatternHelper.substitute(RETRIEVE_PATTERN, "org1", "mod1.2", "2.2",
+            "mod1.2", "jar", "jar", "default")).exists());
+    }
+    
     public void testInline() throws Exception {
         // we first resolve another ivy file
         IvyResolve resolve = new IvyResolve();