ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hi...@apache.org
Subject svn commit: r991266 - /ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyResolveJob.java
Date Tue, 31 Aug 2010 17:11:02 GMT
Author: hibou
Date: Tue Aug 31 17:11:02 2010
New Revision: 991266

URL: http://svn.apache.org/viewvc?rev=991266&view=rev
Log:
Use the version matcher of a project rather than a random one

Modified:
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyResolveJob.java

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyResolveJob.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyResolveJob.java?rev=991266&r1=991265&r2=991266&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyResolveJob.java
(original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyResolveJob.java
Tue Aug 31 17:11:02 2010
@@ -121,8 +121,12 @@ public class IvyResolveJob extends Job {
         if (!inworkspaceModules.isEmpty()) {
             // for the modules which are using the workspace resolver, make sure
             // we resolve them in the correct order
-            // TODO which version matcher we should actually used here ?
-            VersionMatcher versionMatcher = new LatestVersionMatcher();
+
+            // The version matcher used will be the one configured for the first project
+            ResolveRequest request = (ResolveRequest) inworkspaceModules.values().iterator().next();
+            Ivy ivy = request.getContainer().getState().getCachedIvy();
+            VersionMatcher versionMatcher = ivy.getSettings().getVersionMatcher();
+
             WarningNonMatchingVersionReporter nonMatchingVersionReporter = new WarningNonMatchingVersionReporter();
             CircularDependencyStrategy circularDependencyStrategy = WarnCircularDependencyStrategy
                     .getInstance();
@@ -132,7 +136,7 @@ public class IvyResolveJob extends Job {
 
             Iterator it = sortedModuleDescriptors.iterator();
             while (it.hasNext()) {
-                ResolveRequest request = (ResolveRequest) inworkspaceModules.get(it.next());
+                request = (ResolveRequest) inworkspaceModules.get(it.next());
                 boolean canceled = launchResolveThread(request, monitor, errorsStatus);
                 if (canceled) {
                     return Status.CANCEL_STATUS;



Mime
View raw message