You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-commits@incubator.apache.org by ma...@apache.org on 2007/04/04 21:13:10 UTC
svn commit: r525605 - in /incubator/ivy/core/trunk: CHANGES.txt
src/java/org/apache/ivy/ant/IvyResolve.java
test/java/org/apache/ivy/ant/IvyResolveTest.java
Author: maartenc
Date: Wed Apr 4 14:13:09 2007
New Revision: 525605
URL: http://svn.apache.org/viewvc?view=rev&rev=525605
Log:
FIX: ivy-retrieve failure when explicit absolute 'ivy.dep.file' path specified (IVY-396)
Modified:
incubator/ivy/core/trunk/CHANGES.txt
incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyResolve.java
incubator/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyResolveTest.java
Modified: incubator/ivy/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/CHANGES.txt?view=diff&rev=525605&r1=525604&r2=525605
==============================================================================
--- incubator/ivy/core/trunk/CHANGES.txt (original)
+++ incubator/ivy/core/trunk/CHANGES.txt Wed Apr 4 14:13:09 2007
@@ -60,6 +60,7 @@
- IMPROVE: New "modules in use" section in console report at the end of resolve (IVY-373) (thanks to John Wiliams)
- IMPROVE: Generated XML reports now contains more information about the resolved module (IVY-446)
+- FIX: ivy-retrieve failure when explicit absolute 'ivy.dep.file' path specified (IVY-396)
- FIX: IvyPostResolve Task doesn't reuse Ivy file of previous resolve (IVY-458)
- FIX: Ivy standalone is passing null args to main method when invoking with no args (IVY-457)
- FIX: Invalid error report with m2compatible resolver (IVY-456)
Modified: incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyResolve.java
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyResolve.java?view=diff&rev=525605&r1=525604&r2=525605
==============================================================================
--- incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyResolve.java (original)
+++ incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyResolve.java Wed Apr 4 14:13:09 2007
@@ -171,7 +171,7 @@
throw new BuildException("'module' not allowed when not using 'org' attribute");
}
if (_file == null) {
- _file = new File(getProject().getBaseDir(), getProperty(settings, "ivy.dep.file"));
+ _file = getProject().resolveFile(getProperty(settings, "ivy.dep.file"));
}
report = ivy.resolve(
_file.toURL(),
Modified: incubator/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyResolveTest.java
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyResolveTest.java?view=diff&rev=525605&r1=525604&r2=525605
==============================================================================
--- incubator/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyResolveTest.java (original)
+++ incubator/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyResolveTest.java Wed Apr 4 14:13:09 2007
@@ -24,6 +24,7 @@
import org.apache.ivy.Ivy;
import org.apache.ivy.TestHelper;
import org.apache.ivy.core.module.id.ModuleRevisionId;
+import org.apache.ivy.core.report.ResolveReport;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.taskdefs.Delete;
@@ -285,6 +286,23 @@
assertNotNull(project.getReference("ivy.resolved.descriptor.testWithResolveId"));
assertNotNull(project.getReference("ivy.resolved.configurations.ref"));
assertNotNull(project.getReference("ivy.resolved.configurations.ref.testWithResolveId"));
+ }
+
+ public void testResolveWithAbsoluteFile() {
+ // IVY-396
+ File ivyFile = new File("test/java/org/apache/ivy/ant/ivy-simple.xml");
+ _resolve.getProject().setProperty("ivy.dep.file", ivyFile.getAbsolutePath());
+ _resolve.execute();
+
+ assertTrue(getResolvedIvyFileInCache(ModuleRevisionId.newInstance("apache", "resolve-simple", "1.0")).exists());
+ }
+
+ public void testResolveWithRelativeFile() {
+ // IVY-396
+ _resolve.getProject().setProperty("ivy.dep.file", "test/java/org/apache/ivy/ant/ivy-simple.xml");
+ _resolve.execute();
+
+ assertTrue(getResolvedIvyFileInCache(ModuleRevisionId.newInstance("apache", "resolve-simple", "1.0")).exists());
}
private Ivy getIvy() {