Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDJ Houghton2008-10-10 18:24:56 +0000
committerDJ Houghton2008-10-10 18:24:56 +0000
commit6bd48dbc11834858db4b8d3be03214e275eb6519 (patch)
tree6325ff76387c0ac149ce737bb32650b2f8206089 /bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata
parentf13a4a244421f1a43df61c7005a622ac5bb4eed2 (diff)
downloadrt.equinox.p2-6bd48dbc11834858db4b8d3be03214e275eb6519.tar.gz
rt.equinox.p2-6bd48dbc11834858db4b8d3be03214e275eb6519.tar.xz
rt.equinox.p2-6bd48dbc11834858db4b8d3be03214e275eb6519.zip
Bug 250452 - Update applications to handle URIs
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata')
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata/generator/ant/GeneratorTask.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata/generator/ant/GeneratorTask.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata/generator/ant/GeneratorTask.java
index 571c1a594..d4deb5a33 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata/generator/ant/GeneratorTask.java
+++ b/bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata/generator/ant/GeneratorTask.java
@@ -10,8 +10,10 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.metadata.generator.ant;
+import java.net.URISyntaxException;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Task;
+import org.eclipse.equinox.internal.p2.core.helpers.URIUtil;
import org.eclipse.equinox.internal.p2.metadata.generator.EclipseGeneratorApplication;
import org.eclipse.equinox.internal.provisional.p2.metadata.generator.EclipseInstallGeneratorInfoProvider;
import org.eclipse.equinox.internal.provisional.p2.metadata.generator.IncrementalGenerator;
@@ -55,7 +57,11 @@ public class GeneratorTask extends Task {
public void setArtifactRepository(String location) {
if (generator == null)
generator = new EclipseGeneratorApplication();
- generator.setArtifactLocation(location);
+ try {
+ generator.setArtifactLocation(URIUtil.fromString(location));
+ } catch (URISyntaxException e) {
+ throw new IllegalArgumentException("Specified artifact repository location (" + location + ") is not a valid URI. ");
+ }
}
public void setArtifactRepositoryName(String name) {
@@ -133,7 +139,11 @@ public class GeneratorTask extends Task {
public void setMetadataRepository(String location) {
if (generator == null)
generator = new EclipseGeneratorApplication();
- generator.setMetadataLocation(location);
+ try {
+ generator.setMetadataLocation(URIUtil.fromString(location));
+ } catch (URISyntaxException e) {
+ throw new IllegalArgumentException("Specified metadata repository location (" + location + ") is not a valid URI. ");
+ }
}
public void setMetadataRepositoryName(String name) {

Back to the top