ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hi...@apache.org
Subject svn commit: r1374566 - in /ant/ivy/ivyde/trunk: doc/release-notes.html org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/resolve/IvyResolveJob.java org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/resolve/ResolveRequest.java
Date Sat, 18 Aug 2012 12:52:30 GMT
Author: hibou
Date: Sat Aug 18 12:52:30 2012
New Revision: 1374566

URL: http://svn.apache.org/viewvc?rev=1374566&view=rev
Log:
IVYDE-316 : also execute the post resolve task on non failed resolve requests

Modified:
    ant/ivy/ivyde/trunk/doc/release-notes.html
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/resolve/IvyResolveJob.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/resolve/ResolveRequest.java

Modified: ant/ivy/ivyde/trunk/doc/release-notes.html
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/doc/release-notes.html?rev=1374566&r1=1374565&r2=1374566&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/doc/release-notes.html (original)
+++ ant/ivy/ivyde/trunk/doc/release-notes.html Sat Aug 18 12:52:30 2012
@@ -139,6 +139,7 @@ List of changes since <a href="/ivy/ivyd
     <li>FIX: Ivy report view stopped working on Linux (IVYDE-292)</li>
     <li>FIX: Ivy settings URL is constructed incorrectly from environment variable
(IVYDE-314)</li>
     <li>FIX: Incomplete variable substitution for ivysettings.xml (IVYDE-318)</li>
+    <li>FIX: In case of a multi-resolve, one fail make them all fail (IVYDE-316)</li>
 </ul>
     <!-- samples
 <ul>

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/resolve/IvyResolveJob.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/resolve/IvyResolveJob.java?rev=1374566&r1=1374565&r2=1374566&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/resolve/IvyResolveJob.java
(original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/resolve/IvyResolveJob.java
Sat Aug 18 12:52:30 2012
@@ -97,7 +97,7 @@ public class IvyResolveJob extends Job {
         Map/* <ResolveRequest, Ivy> */ivys = new HashMap();
         Map/* <ResolveRequest, ModuleDescriptor> */mds = new HashMap();
 
-        MultiStatus errorsStatus = new MultiStatus(IvyPlugin.ID, IStatus.ERROR,
+        final MultiStatus errorsStatus = new MultiStatus(IvyPlugin.ID, IStatus.ERROR,
                 "Some projects fail to be resolved", null);
 
         int step = IVY_LOAD_LENGTH / toResolve.size();
@@ -206,14 +206,6 @@ public class IvyResolveJob extends Job {
             }
         }
 
-        if (errorsStatus.getChildren().length != 0) {
-            // some errors happend, stop here
-            if (forceFailOnError || IvyPlugin.getPreferenceStoreHelper().isErrorPopup())
{
-                return errorsStatus;
-            }
-            return Status.OK_STATUS;
-        }
-
         step = POST_RESOLVE_LENGTH / toResolve.size();
 
         monitor.setTaskName("Post resolve");
@@ -222,11 +214,21 @@ public class IvyResolveJob extends Job {
         Iterator itRequests = toResolve.iterator();
         while (itRequests.hasNext()) {
             ResolveRequest request = (ResolveRequest) itRequests.next();
-            monitor.setTaskName(request.getResolver().toString());
-            request.getResolver().postBatchResolve();
+            if (!request.isResolveFailed()) {
+                monitor.setTaskName(request.getResolver().toString());
+                request.getResolver().postBatchResolve();
+            }
             monitor.worked(step);
         }
 
+        if (errorsStatus.getChildren().length != 0) {
+            // some errors happend, stop here
+            if (forceFailOnError || IvyPlugin.getPreferenceStoreHelper().isErrorPopup())
{
+                return errorsStatus;
+            }
+            return Status.OK_STATUS;
+        }
+
         return Status.OK_STATUS;
     }
 
@@ -258,6 +260,7 @@ public class IvyResolveJob extends Job {
             case IStatus.INFO:
                 break;
             case IStatus.ERROR:
+                request.setResolveFailed(true);
                 errorsStatus.add(status[0]);
                 break;
             default:

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/resolve/ResolveRequest.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/resolve/ResolveRequest.java?rev=1374566&r1=1374565&r2=1374566&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/resolve/ResolveRequest.java
(original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/resolve/ResolveRequest.java
Sat Aug 18 12:52:30 2012
@@ -29,6 +29,8 @@ public class ResolveRequest {
 
     private boolean forceFailOnError = false;
 
+    private boolean resolveFailed = false;
+
     public ResolveRequest(IvyResolver resolver, CachedIvy cachedIvy) {
         this.resolver = resolver;
         this.cachedIvy = cachedIvy;
@@ -51,13 +53,21 @@ public class ResolveRequest {
     }
 
     public void setInWorkspace(boolean inWorkspace) {
-        this.inWorkspace  = inWorkspace;
+        this.inWorkspace = inWorkspace;
     }
 
     public boolean isInWorkspace() {
         return inWorkspace;
     }
 
+    public void setResolveFailed(boolean resolveFailed) {
+        this.resolveFailed = resolveFailed;
+    }
+
+    public boolean isResolveFailed() {
+        return resolveFailed;
+    }
+
     public String toString() {
         return resolver.toString();
     }



Mime
View raw message