ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maart...@apache.org
Subject svn commit: r718421 - in /ant/ivy/core/trunk: CHANGES.txt src/java/org/apache/ivy/plugins/resolver/BasicResolver.java
Date Mon, 17 Nov 2008 22:38:45 GMT
Author: maartenc
Date: Mon Nov 17 14:38:45 2008
New Revision: 718421

URL: http://svn.apache.org/viewvc?rev=718421&view=rev
Log:
IMPROVEMENT: Support useOrigin for artifacts with a set url attribute (IVY-965)

Modified:
    ant/ivy/core/trunk/CHANGES.txt
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/BasicResolver.java

Modified: ant/ivy/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=718421&r1=718420&r2=718421&view=diff
==============================================================================
--- ant/ivy/core/trunk/CHANGES.txt (original)
+++ ant/ivy/core/trunk/CHANGES.txt Mon Nov 17 14:38:45 2008
@@ -83,6 +83,8 @@
 	
    trunk
 =====================================
+- IMPROVEMENT: Support useOrigin for artifacts with a set url attribute (IVY-965) (thanks
to alex322)
+
 - FIX: Log levels aren't respected in certain cases using the standalone functionality (IVY-960)
(thanks to Patrick Woodworth)
 - FIX: Listing of URL's under a given URL does not handle fully specified URL's (IVY-959)
(thanks to Randy Nott)
 - FIX: NPE in LogReportOutputter (IVY-961)

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/BasicResolver.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/BasicResolver.java?rev=718421&r1=718420&r2=718421&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/BasicResolver.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/BasicResolver.java Mon Nov
17 14:38:45 2008
@@ -64,6 +64,8 @@
 import org.apache.ivy.plugins.repository.ArtifactResourceResolver;
 import org.apache.ivy.plugins.repository.Resource;
 import org.apache.ivy.plugins.repository.ResourceDownloader;
+import org.apache.ivy.plugins.repository.file.FileRepository;
+import org.apache.ivy.plugins.repository.file.FileResource;
 import org.apache.ivy.plugins.repository.url.URLRepository;
 import org.apache.ivy.plugins.repository.url.URLResource;
 import org.apache.ivy.plugins.resolver.util.MDResolvedResource;
@@ -918,7 +920,13 @@
                 URL url = artifact.getUrl();
                 Message.verbose("\tusing url for " + artifact + ": " + url);
                 logArtifactAttempt(artifact, url.toExternalForm());
-                ret = new ResolvedResource(new URLResource(url), artifact.getModuleRevisionId()
+                Resource resource;
+                if ("file".equals(url.getProtocol())) {
+                    resource = new FileResource(new FileRepository(), new File(url.getPath()));
+                } else {
+                    resource = new URLResource(url);
+                }
+                ret = new ResolvedResource(resource, artifact.getModuleRevisionId()
                         .getRevision());
             }
             return ret;



Mime
View raw message