Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDJ Houghton2008-10-10 18:25:36 +0000
committerDJ Houghton2008-10-10 18:25:36 +0000
commit2351ff74f14e9da7fe365e351b0b7c4737254e51 (patch)
treecb678bb38fa23bb295a83d9640f8f4c44b0d9168 /bundles/org.eclipse.equinox.p2.publisher/src_ant
parent6bd48dbc11834858db4b8d3be03214e275eb6519 (diff)
downloadrt.equinox.p2-2351ff74f14e9da7fe365e351b0b7c4737254e51.tar.gz
rt.equinox.p2-2351ff74f14e9da7fe365e351b0b7c4737254e51.tar.xz
rt.equinox.p2-2351ff74f14e9da7fe365e351b0b7c4737254e51.zip
Bug 250452 - Update applications to handle URIs
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.publisher/src_ant')
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/PublisherTask.java22
1 files changed, 9 insertions, 13 deletions
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/PublisherTask.java b/bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/PublisherTask.java
index a78a15c74..6a753f251 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/PublisherTask.java
+++ b/bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/PublisherTask.java
@@ -11,7 +11,7 @@
package org.eclipse.equinox.internal.p2.publisher.ant;
import java.io.File;
-import java.net.MalformedURLException;
+import java.net.URI;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Task;
import org.eclipse.core.runtime.IStatus;
@@ -31,9 +31,9 @@ public class PublisherTask extends Task {
protected PublisherInfo provider = null;
protected String source;
- protected String metadataLocation;
+ protected URI metadataLocation;
protected String metadataRepoName;
- protected String artifactLocation;
+ protected URI artifactLocation;
protected String artifactRepoName;
protected boolean compress = false;
protected boolean inplace = false;
@@ -123,14 +123,10 @@ public class PublisherTask extends Task {
protected void initialize(PublisherInfo info) throws ProvisionException {
if (inplace) {
File location = new File(source);
- try {
- if (metadataLocation == null)
- metadataLocation = location.toURL().toExternalForm();
- if (artifactLocation == null)
- artifactLocation = location.toURL().toExternalForm();
- } catch (MalformedURLException e) {
- // ought not happen...
- }
+ if (metadataLocation == null)
+ metadataLocation = location.toURI();
+ if (artifactLocation == null)
+ artifactLocation = location.toURI();
info.setArtifactOptions(info.getArtifactOptions() | IPublisherInfo.A_INDEX | IPublisherInfo.A_PUBLISH);
} else
info.setArtifactOptions(info.getArtifactOptions() | IPublisherInfo.A_INDEX | IPublisherInfo.A_PUBLISH | IPublisherInfo.A_OVERWRITE);
@@ -152,7 +148,7 @@ public class PublisherTask extends Task {
append = Boolean.valueOf(value).booleanValue();
}
- public void setArtifactRepository(String location) {
+ public void setArtifactRepository(URI location) {
artifactLocation = location;
}
@@ -213,7 +209,7 @@ public class PublisherTask extends Task {
public void setLauncherConfig(String value) {
}
- public void setMetadataRepository(String location) {
+ public void setMetadataRepository(URI location) {
metadataLocation = location;
}

Back to the top