Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Hammar2013-04-11 14:26:47 -0400
committerIgor Fedorenko2013-05-08 11:17:41 -0400
commit6677bc514714d2a7a6a10f572ba8b949636f7e21 (patch)
tree822faee5ec4cb476a936d861fe9df264688d3892
parent973fc4fdf0723879c962bc7b6da2ec84bbdf2ce4 (diff)
downloadm2e-core-6677bc514714d2a7a6a10f572ba8b949636f7e21.tar.gz
m2e-core-6677bc514714d2a7a6a10f572ba8b949636f7e21.tar.xz
m2e-core-6677bc514714d2a7a6a10f572ba8b949636f7e21.zip
405427 Implemented m2e version neutral system property for configuring discovery catalog pathmilestones/1.4/1.4.0.20130508-1527
Signed-off-by: Anders Hammar <anders@hammar.net>
-rw-r--r--org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/MavenDiscovery.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/MavenDiscovery.java b/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/MavenDiscovery.java
index c41b0178..3c59869c 100644
--- a/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/MavenDiscovery.java
+++ b/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/MavenDiscovery.java
@@ -62,9 +62,17 @@ public class MavenDiscovery {
private static final Tag MAVEN_TAG = new Tag("maven", Messages.MavenDiscovery_Wizard_MavenTag); //$NON-NLS-1$
- public static final String DEFAULT_URL = "http://download.eclipse.org/technology/m2e/discovery/directory-1.4.xml"; //$NON-NLS-1$
+ private static final String DEFAULT_BASEURL = "http://download.eclipse.org/technology/m2e/discovery/"; //$NON-NLS-1$
- public static final String PATH = System.getProperty("m2e.discovery.url", DEFAULT_URL); //$NON-NLS-1$
+ private static final String DEFAULT_FILENAME = "directory-1.4.xml"; //$NON-NLS-1$
+
+ public static final String DEFAULT_URL = DEFAULT_BASEURL + DEFAULT_FILENAME;
+
+ private static final String CONFIGURED_URL = System.getProperty("m2e.discovery.url"); //$NON-NLS-1$
+
+ private static final String BASEURL = System.getProperty("m2e.discovery.baseurl", DEFAULT_BASEURL); //$NON-NLS-1$
+
+ public static final String PATH;
public static final String LIFECYCLE_PATH = "lifecycle/"; //$NON-NLS-1$
@@ -72,6 +80,10 @@ public class MavenDiscovery {
public static final String PLUGINXML_EXT = ".pluginxml"; //$NON-NLS-1$
+ static {
+ PATH = CONFIGURED_URL != null ? CONFIGURED_URL : BASEURL + DEFAULT_FILENAME;
+ }
+
@SuppressWarnings("unchecked")
public static void launchWizard(Shell shell) {
launchWizard(shell, Collections.EMPTY_LIST, Collections.EMPTY_LIST, Collections.EMPTY_LIST, Collections.EMPTY_LIST);

Back to the top