Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 337912

Summary: [discovery] Discovery URL should be configurable
Product: z_Archived Reporter: Matthew Piggott <matthew>
Component: m2eAssignee: Fred Bricon <fbricon>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: fbricon, igor, michael.sena
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Matthew Piggott CLA 2011-02-22 17:01:02 EST
We may want to allow some configuration of the URL used for discovery.
Comment 1 Igor Fedorenko CLA 2011-02-22 17:39:39 EST
Please provide complete user story so we understand who and under what circumstances might want to change discovery URL.
Comment 2 Michael Mising name CLA 2011-08-24 19:05:52 EDT
I agree. I have an issue ongoing at the moment where I can't access the discovery catalog because of a proxy issue.  I wanted to configure the url to a local hosted version, or just to another xml file so I could redirect to a custom jar.  I think it shouldn't be easily configurable, if that's your concern, but at least make it a property.
Comment 3 Fred Bricon CLA 2012-02-29 05:15:38 EST
Igor,

in order to test changes to the discovery catalog, I found it convenient to change  the hardcoded PATH value in MavenDiscovery.java to 

  public static final String PATH;
  
  static {
    String defaultPath = "http://download.eclipse.org/technology/m2e/discovery/directory-1.1.xml"; //$NON-NLS-1$ 
    PATH = System.getProperty("m2e.discovery.url", defaultPath); //$NON-NLS-1$
  }

That allows me to easily test upcoming changes in the catalog with a JVM property like -Dm2e.discovery.url=file:/D:/directory.xml

Are you ok for me to push that change?
Comment 4 Igor Fedorenko CLA 2012-02-29 10:23:19 EST
Yes, this looks okay, just use "public static final String DEFAULT_URL =..." for the default url ;-)
Comment 5 Fred Bricon CLA 2012-02-29 11:25:57 EST
Fixed using an environment variable. Alternate discovery URLs can be used by launching eclipse with : 
-Dm2e.discovery.url=/some/url/
Comment 6 Denis Roy CLA 2021-04-19 13:22:26 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/