Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Niefer2009-09-23 15:54:45 -0400
committerAndrew Niefer2009-09-23 15:54:45 -0400
commit904218cc7294f09026c2e2ed51b26de5a3c1c56e (patch)
treed751fb3cd34896c3da26eb51a97c0493e0d37d47 /bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse
parentdda41c7d886f47b5cfabf1b38a089fdef1fcca51 (diff)
downloadrt.equinox.p2-904218cc7294f09026c2e2ed51b26de5a3c1c56e.tar.gz
rt.equinox.p2-904218cc7294f09026c2e2ed51b26de5a3c1c56e.tar.xz
rt.equinox.p2-904218cc7294f09026c2e2ed51b26de5a3c1c56e.zip
bug 289345 - repo2runnable stops when some IUs are missing
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse')
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/Repo2RunnableTask.java15
1 files changed, 13 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/Repo2RunnableTask.java b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/Repo2RunnableTask.java
index 5d03cb48d..8763492a5 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/Repo2RunnableTask.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/Repo2RunnableTask.java
@@ -12,6 +12,7 @@ package org.eclipse.equinox.p2.internal.repository.tools.tasks;
import java.util.List;
import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
import org.eclipse.equinox.p2.internal.repository.tools.Messages;
@@ -28,6 +29,8 @@ import org.eclipse.equinox.p2.internal.repository.tools.Repo2Runnable;
*/
public class Repo2RunnableTask extends AbstractRepositoryTask {
+ private boolean failOnError = true;
+
/*
* Constructor for the class. Create a new instance of the application
* so we can populate it with attributes.
@@ -49,10 +52,18 @@ public class Repo2RunnableTask extends AbstractRepositoryTask {
throw new BuildException(Messages.exception_needIUsOrNonEmptyRepo);
application.setSourceIUs(ius);
IStatus result = application.run(null);
- if (result.matches(IStatus.ERROR))
+ if (failOnError && result.matches(IStatus.ERROR))
throw new ProvisionException(result);
} catch (ProvisionException e) {
- throw new BuildException(Messages.Repo2RunnableTask_errorTransforming, e);
+ if (failOnError)
+ throw new BuildException(Messages.Repo2RunnableTask_errorTransforming, e);
+ /* else */
+ getProject().log(Messages.Repo2RunnableTask_errorTransforming, Project.MSG_WARN);
+ getProject().log(e.getMessage(), Project.MSG_WARN);
}
}
+
+ public void setFailOnError(boolean fail) {
+ this.failOnError = fail;
+ }
}

Back to the top