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

Bug 366583

Summary: Do not force any settings.xml by default
Product: Community Reporter: Igor Fedorenko <igor>
Component: CI-JenkinsAssignee: Eclipse Webmaster <webmaster>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: alex.blewitt, bentmann, frederic.gurr, mistria, t-oberlies
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug

Description Igor Fedorenko CLA 2011-12-13 12:07:04 EST
As suggested in https://bugs.eclipse.org/bugs/show_bug.cgi?id=365727#c9 , hudson.eclipse.org should not force any settings.xml on jobs running there. Use of maven.eclipse.org should be offered as an option for projects that choose to use it.
Comment 1 Alex Blewitt CLA 2011-12-13 12:19:17 EST
The current settings.xml seems to rewrite dependencies on at least maven central to  http://maven.eclipse.org/nexus/content/groups/build/*

However, the /build/ isn't set up to proxy -SNAPSHOTs from Maven Central, so by doing this we limit at least some of the behaviour that perhaps might be expected by some builds (e.g. https://hudson.eclipse.org/hudson/job/tycho-its-linux-nightly/88/console)

If we're going to proxy central, we probably only want to proxy central and then have the mirrorOf handle that for both release and snapshot releases, and nothing else. Either that, or we should make the settings.xml opt-out.

For any projects which need content outside of central, the correct way is for that repository to have the repository listed in its poms, and not as part of a Maven repository. (There may be other things in the settings.xml where we can proxy appropriately but that's a different issue.)

Igor, if we switched the settings.xml such that it referred only to central and central snapshots, would that alleviate your concerns?
Comment 2 Igor Fedorenko CLA 2011-12-13 12:33:39 EST
(In reply to comment #1)
> 
> 
> Igor, if we switched the settings.xml such that it referred only to central and
> central snapshots, would that alleviate your concerns?

I think it is acceptable for hudson.eclipse.org to force use of proxy for maven central repository, provided the proxy is reliable, the serves central contents as is and the overall configuration does not prevent access to other repositories. If you are interested, I can recommend settings.xml that satisfies the latter two requirements, but I obviously can't help with reliability of maven.eclipse.org.

There is no such thing as central snapshots.
Comment 3 Alex Blewitt CLA 2011-12-13 13:40:06 EST
Yes please Igor - if you can recommend how we should have a settings which enables a local proxy cache for Maven Central whilst not preventing other repositories that would be good. I assume we will have some kind of <mirrorOf>central</mirrorOf> in there. I can't see how we would accidentally block any other repositories unless we had something like <mirrorOf>*</mirrorOf> in there.
Comment 4 Igor Fedorenko CLA 2011-12-16 10:31:50 EST
I don't know if you need to configure any http/https proxy and/or auth information, but the following settings.xml should be sufficient to redirect Central repository requests to maven.eclipse.org and allow direct access to all other repositories


<settings>
  <mirrors>
    <mirror>
      <id>maven-eclipse-org</id>
      <mirrorOf>central</mirrorOf>
      <url>http://maven.eclipse.org/nexus/content/repositories/repo2/</url>
    </mirror>
  </mirrors>
</settings>
Comment 5 Benjamin Bentmann CLA 2011-12-16 10:54:32 EST
(In reply to comment #4)
>       <url>http://maven.eclipse.org/nexus/content/repositories/repo2/</url>

I just looked briefly over http://maven.eclipse.org/nexus/content/repositories/ which lists "central", "repo1" and "repo2" which suggests some kind of misunderstanding on the maven.eclipse.org side unless the Nexus admis apply a different meaning to those terms than the Maven community.

The Maven community uses the term "central" as short/nick name for the central Maven repository. The contents making up this repository is available via various URLs like "http://repo1.maven.org/maven2/", "http://repo2.maven.org/maven2/" and "http://uk.maven.org/maven2/". Those URLs serve load-balancing/fallover but eventually all point at the same contents, e.g. there is no difference between "repo1" and "repo2". As such I suggest that the Nexus config gets cleaned up to only proxy the central repo once, preferrably using the id "central-proxy" or "central" to use a well-recognized name.

Likewise, the central repository does not and never will host snapshots. As such the repository "repo1-snapshot" should be superfluous.
Comment 6 Benjamin Bentmann CLA 2012-03-10 10:36:19 EST
(In reply to comment #1)
> The current settings.xml seems to rewrite dependencies on at least maven
> central to  http://maven.eclipse.org/nexus/content/groups/build/*

Ping. Just got bit by this again. One slave attempted to resolve via maven.e.o and the build dies [0] because the server pukes HTTP 500s or simply serves empty/corrupt files.

[0] https://hudson.eclipse.org/hudson/job/aether-core-nightly/jdk=Java%206%20R%2021%2064bit%20%28SUN%29,label=mac-tests/97/console
Comment 7 Eclipse Webmaster CLA 2012-03-16 16:31:58 EDT
Hudsons global Maven settings file only specifies the proxy to use. This sounds more like an issue with maven.eclipse.org

-M.
Comment 8 Eclipse Genie CLA 2014-09-22 00:33:40 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 9 Eclipse Genie CLA 2016-09-12 16:39:01 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 10 Frederic Gurr CLA 2018-08-16 10:22:19 EDT
6 years later this can certainly be closed. settings.xml works as expected in most cases.