Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDJ Houghton2009-02-09 09:53:44 -0500
committerDJ Houghton2009-02-09 09:53:44 -0500
commit1de7f89e2b47f41a0fd568f32e7e20d80c6ffd79 (patch)
treeb7d825577a10ca7638b82b7f79627fe4e7216d8b /bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse
parentcbb6559e3de298abc932e0b469ec9982eb758961 (diff)
downloadrt.equinox.p2-1de7f89e2b47f41a0fd568f32e7e20d80c6ffd79.tar.gz
rt.equinox.p2-1de7f89e2b47f41a0fd568f32e7e20d80c6ffd79.tar.xz
rt.equinox.p2-1de7f89e2b47f41a0fd568f32e7e20d80c6ffd79.zip
Bug 264186 - Repo transformer app should fail early if there are no IUs to process
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.java12
1 files changed, 6 insertions, 6 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 ae0edb146..00e75e64d 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
@@ -61,12 +61,12 @@ public class Repo2RunnableTask extends Task {
try {
prepareSourceRepos();
List ius = prepareIUs();
- if (ius != null && ius.size() > 0) {
- application.setSourceIUs(ius);
- IStatus result = application.run(null);
- if (result.matches(IStatus.ERROR))
- throw new ProvisionException(result);
- }
+ if (ius == null || ius.size() == 0)
+ throw new BuildException("Need to specify either a non-empty source metadata repository or a valid list of IUs.");
+ application.setSourceIUs(ius);
+ IStatus result = application.run(null);
+ if (result.matches(IStatus.ERROR))
+ throw new ProvisionException(result);
} catch (ProvisionException e) {
throw new BuildException("Error occurred while transforming repository.", e);
} catch (URISyntaxException e) {

Back to the top