Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Piggott2011-03-22 09:47:54 -0400
committerMatthew Piggott2011-03-22 09:47:54 -0400
commit5b68038bb56ca2bd777ac7d359b4524c5fbc347d (patch)
treed7a3112806867a74f4cfb0ee7703858a817a905e /org.eclipse.m2e.discovery/src
parentc711f02bd4d1b170d8c1ec4f905cb151c50bc03a (diff)
downloadm2e-core-5b68038bb56ca2bd777ac7d359b4524c5fbc347d.tar.gz
m2e-core-5b68038bb56ca2bd777ac7d359b4524c5fbc347d.tar.xz
m2e-core-5b68038bb56ca2bd777ac7d359b4524c5fbc347d.zip
Change discovery to use versioned URL
Diffstat (limited to 'org.eclipse.m2e.discovery/src')
-rw-r--r--org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/MavenDiscovery.java11
1 files changed, 10 insertions, 1 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 ad477fa3..d24a2c78 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
@@ -39,6 +39,7 @@ import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.internal.Workbench;
+import org.osgi.framework.Version;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -57,7 +58,7 @@ public class MavenDiscovery {
private static final Tag MAVEN_TAG = new Tag("maven", Messages.MavenDiscovery_Wizard_MavenTag); //$NON-NLS-1$
- private static final String PATH = "http://download.eclipse.org/technology/m2e/discovery/directory.xml"; //$NON-NLS-1$
+ private static final String PATH;
public static final String LIFECYCLE_PATH = "lifecycle/"; //$NON-NLS-1$
@@ -65,6 +66,14 @@ public class MavenDiscovery {
public static final String PLUGINXML_EXT = ".pluginxml"; //$NON-NLS-1$
+ static {
+ Version v = DiscoveryActivator.getDefault().getBundle().getVersion();
+ StringBuilder sb = new StringBuilder("http://download.eclipse.org/technology/m2e/discovery/"); //$NON-NLS-1$
+ sb.append(v.getMajor()).append('.').append(v.getMinor()).append('.').append(v.getMicro());
+ sb.append("/directory.xml"); //$NON-NLS-1$
+ PATH = sb.toString();
+ }
+
public static void launchWizard(Shell shell) {
launchWizard(shell, Collections.EMPTY_LIST, Collections.EMPTY_LIST, Collections.EMPTY_LIST, Collections.EMPTY_LIST);
}

Back to the top