ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hi...@apache.org
Subject svn commit: r1004630 - in /ant/ivy/core/trunk/src/java/org/apache/ivy: core/resolve/ResolveEngine.java plugins/resolver/BasicResolver.java
Date Tue, 05 Oct 2010 13:16:02 GMT
Author: hibou
Date: Tue Oct  5 13:16:01 2010
New Revision: 1004630

URL: http://svn.apache.org/viewvc?rev=1004630&view=rev
Log:
IVY-1227: don't use the CacheResolver when useCacheOnly=true but rely on the real resolvers,
so we hit the proper caches.

Modified:
    ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveEngine.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/BasicResolver.java

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveEngine.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveEngine.java?rev=1004630&r1=1004629&r2=1004630&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveEngine.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveEngine.java Tue Oct  5
13:16:01 2010
@@ -202,9 +202,9 @@ public class ResolveEngine {
             throws ParseException, IOException {
         DependencyResolver oldDictator = getDictatorResolver();
         IvyContext context = IvyContext.getContext();
-        if (options.isUseCacheOnly()) {
-            setDictatorResolver(new CacheResolver(settings));
-        }
+//        if (options.isUseCacheOnly()) {
+//            setDictatorResolver(new CacheResolver(settings));
+//        }
         try {
             String[] confs = options.getConfs(md);
             options.setConfs(confs);

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=1004630&r1=1004629&r2=1004630&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 Tue Oct
 5 13:16:01 2010
@@ -217,7 +217,11 @@ public abstract class BasicResolver exte
                     return checkLatest(systemDd, checkForcedResolvedModuleRevision(rmr),
data);
                 }
             }
-            
+            if (data.getOptions().isUseCacheOnly()) {
+                throw new UnresolvedDependencyException(
+                    "\t" + getName() + " (useCacheOnly) : no ivy file found for " + systemMrid,
false);
+            }
+
             checkInterrupted();
             
             ResolvedResource ivyRef = findIvyFileRef(nsDd, data);



Mime
View raw message