Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Niefer2009-09-24 11:35:21 -0400
committerAndrew Niefer2009-09-24 11:35:21 -0400
commit3dd1798af27570e63970649454774ba49116cb65 (patch)
treebfcca5e531d2b8846ea0617c1a76ca9cc0122d3a /bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse
parentaf1d44698b2dcdfdcfe479d4bceb3256e96e5bac (diff)
downloadrt.equinox.p2-3dd1798af27570e63970649454774ba49116cb65.tar.gz
rt.equinox.p2-3dd1798af27570e63970649454774ba49116cb65.tar.xz
rt.equinox.p2-3dd1798af27570e63970649454774ba49116cb65.zip
bug 290323 - remove IUs from repo
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/RemoveIUTask.java33
1 files changed, 19 insertions, 14 deletions
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RemoveIUTask.java b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RemoveIUTask.java
index ccf1032b1..ed4749ad2 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RemoveIUTask.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RemoveIUTask.java
@@ -27,20 +27,19 @@ import org.eclipse.osgi.util.NLS;
public class RemoveIUTask extends AbstractRepositoryTask {
- public RemoveIUTask() {
- application = new AbstractApplication() {
- public IStatus run(IProgressMonitor monitor) {
- return null;
- }
+ protected static class RemoveIUApplication extends AbstractApplication {
+ //Only need the application to reuse super's repo management.
+ public IStatus run(IProgressMonitor monitor) {
+ return null;
+ }
- public IMetadataRepository getCompositeMetadataRepository() {
- return destinationMetadataRepository;
- }
+ public void finalizeRepos() throws ProvisionException {
+ super.finalizeRepositories();
+ }
+ }
- public IArtifactRepository getCompositeArtifactRepository() {
- return destinationArtifactRepository;
- }
- };
+ public RemoveIUTask() {
+ this.application = new RemoveIUApplication();
}
public void execute() throws BuildException {
@@ -52,8 +51,8 @@ public class RemoveIUTask extends AbstractRepositoryTask {
if (application.getCompositeMetadataRepository() == null)
throw new BuildException(Messages.AbstractApplication_no_valid_destinations); //need a repo
- IMetadataRepository repository = application.getCompositeMetadataRepository();
- IArtifactRepository artifacts = application.getCompositeArtifactRepository();
+ IMetadataRepository repository = application.getDestinationMetadataRepository();
+ IArtifactRepository artifacts = application.getDestinationArtifactRepository();
for (Iterator iter = iuTasks.iterator(); iter.hasNext();) {
IUDescription iu = (IUDescription) iter.next();
@@ -76,6 +75,12 @@ public class RemoveIUTask extends AbstractRepositoryTask {
}
} catch (ProvisionException e) {
throw new BuildException(e);
+ } finally {
+ try {
+ ((RemoveIUApplication) application).finalizeRepos();
+ } catch (ProvisionException e) {
+ throw new BuildException(e);
+ }
}
}
}

Back to the top