Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with p2 mirror configuration #2533

Open
fipro78 opened this issue Jun 15, 2023 · 0 comments
Open

Issue with p2 mirror configuration #2533

fipro78 opened this issue Jun 15, 2023 · 0 comments

Comments

@fipro78
Copy link
Contributor

fipro78 commented Jun 15, 2023

I noticed an issue that the mirror configuration for a p2 repository is not working correctly. Honestly I am not sure if the issue is related to a trailing slash in the target definition or if the issue is somewhere else.

I tried to build Eclipse Equinox locally behind a corporate proxy, but I get strange errors. The error message is:

Failed to resolve target definition file:/C:/Users/xxx/.m2/repository/org/eclipse/eclipse-sdk-prereqs/4.29.0-SNAPSHOT/eclipse-sdk-prereqs-4.29.0-SNAPSHOT.target: Failed to load p2 metadata repository from location https://download.eclipse.org/tools/orbit/downloads/drops/R20201118194144/repository/: Unable to read repository at https://download.eclipse.org/tools/orbit/downloads/drops/R20201118194144/repository. ConnectException: UnresolvedAddressException

I tried to configure a local mirror in my settings.xml like this:

   <mirror>
	  <id>orbit202305-local</id>
	  <mirrorOf>https://download.eclipse.org/tools/orbit/downloads/drops/R20230531010532/repository</mirrorOf>
	  <url>file:///C:/Development/update-sites/orbit-202305/</url>
	  <layout>p2</layout>
	  <mirrorOfLayouts>p2</mirrorOfLayouts>
   </mirror>

But the mirror doesn't seem to be used. I checked the target file that is downloaded in the local maven repository, and there I see a trailing slash in the repository location. The Tycho docs say, there should be no trailing slash.

The settings.xml is at the default location.

The info message before the failure is the following:

[INFO] Loading repository '' from mirror 'orbit202305-local' at 'file:///C:/Development/update-sites/orbit-202305/'
[INFO] ### Using TychoRepositoryTransport for remote P2 access ###
[INFO]     Cache location:         C:\Users\fad8pl\.m2\repository\.cache\tycho
[INFO]     Transport mode:         online
[INFO]     Http Transport type:    Java11Client
[INFO]     Update mode:            cache first
[INFO]     Minimum cache duration: 60 minutes
[INFO]       (you can configure this with -Dtycho.p2.transport.min-cache-minutes=<desired minimum cache duration>)
[INFO] Downloading from p2: https://download.eclipse.org/tools/orbit/downloads/drops/R20201118194144/repository/p2.index

The eclipse-sdk-prereqs has trailing slashes in the location. As I said, I am not sure if this is really the issue, or if the mirror is not used. Can't tell if the mirror matching is too strict in the comparison. If this is really the case, IMHO Tycho should be less strict here and remove that requirement.

Bananeweizen added a commit to Bananeweizen/tycho that referenced this issue Dec 24, 2023
If a proxy is specified with the https procotol in the settings.xml,
Tycho fails downloading artifacts from any URL that uses that proxy,
because it wrongly configures a SOCKS transport in such cases.

Fixes eclipse-tycho#1935, eclipse-tycho#2709, eclipse-tycho#2533.
laeubi pushed a commit that referenced this issue Dec 24, 2023
If a proxy is specified with the https procotol in the settings.xml,
Tycho fails downloading artifacts from any URL that uses that proxy,
because it wrongly configures a SOCKS transport in such cases.

Fixes #1935, #2709, #2533.
github-actions bot pushed a commit that referenced this issue Dec 24, 2023
If a proxy is specified with the https procotol in the settings.xml,
Tycho fails downloading artifacts from any URL that uses that proxy,
because it wrongly configures a SOCKS transport in such cases.

Fixes #1935, #2709, #2533.

(cherry picked from commit d64b98f)
laeubi pushed a commit that referenced this issue Dec 25, 2023
If a proxy is specified with the https procotol in the settings.xml,
Tycho fails downloading artifacts from any URL that uses that proxy,
because it wrongly configures a SOCKS transport in such cases.

Fixes #1935, #2709, #2533.

(cherry picked from commit d64b98f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant