Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CompositeRepositoryTask.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CompositeRepositoryTask.java b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CompositeRepositoryTask.java
index 14659399d..f4ccc3f1d 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CompositeRepositoryTask.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CompositeRepositoryTask.java
@@ -71,12 +71,17 @@ public class CompositeRepositoryTask extends AbstractRepositoryTask {
public void addConfiguredRemove(RepositoryList list) {
if (list.getRepoLocation() != null) {
RepositoryDescriptor descriptor = new RepositoryDescriptor();
- descriptor.setLocation(list.getRepoLocationURI());
- descriptor.setOptional(list.isOptional());
- if (!list.isBoth()) {
- descriptor.setKind(list.isArtifact() ? RepositoryDescriptor.KIND_ARTIFACT : RepositoryDescriptor.KIND_METADATA);
+ try {
+ //don't use RepositoryList#getRepoLocationURI() because we want relative URIs if they were specified
+ descriptor.setLocation(URIUtil.fromString(list.getRepoLocation()));
+ descriptor.setOptional(list.isOptional());
+ if (!list.isBoth()) {
+ descriptor.setKind(list.isArtifact() ? RepositoryDescriptor.KIND_ARTIFACT : RepositoryDescriptor.KIND_METADATA);
+ }
+ ((CompositeRepositoryApplication) application).removeChild(descriptor);
+ } catch (URISyntaxException e) {
+ // no good, don't remove
}
- ((CompositeRepositoryApplication) application).addChild(descriptor);
}
for (DestinationRepository repo : list.getRepositoryList()) {
((CompositeRepositoryApplication) application).removeChild(repo.getDescriptor());

Back to the top