OpenNTF / p2-layout-provider

Java web app that serves as a basic proxy to provide a Maven repository front-end to p2 (Eclipse-style) repositories
Apache License 2.0
7 stars 5 forks source link

Resolver may attempt to fetch URLs on Maven Central #34

Closed jesse-gallagher closed 2 years ago

jesse-gallagher commented 3 years ago

As seen as a secondary effect in https://github.com/OpenNTF/p2-layout-provider/issues/33 , p2 resolver code is for some reason involved in fetching from Maven Central URLs. This may be unavoidable, and it may also be the case that it's not actually trying to fetch the above URL (and is instead just an artifact of logging sequence), but it's worth looking into.

reckart commented 3 years ago

I think this may have been a red herring in the log. After inspecting the situation in the debugger, I could see that the error was triggered when the resolver way trying to load the composite-artifact thingy from the actual p2 url, but the URL was a "http" url which returned a not-found page with a redirect header - and instead of following the redirect, the p2 resolver then failed because it could not parse the HTML error page body with an XML parser.

jesse-gallagher commented 3 years ago

That's what I came around to thinking as I was typing this up, but I figure I'll leave this issue until I get a chance to investigate, just in case.

reckart commented 3 years ago

The factory checks for the layout of the remote repository, so if a remote repository does not have the "p2" layout, then the factory should actually not return a resolver - and that is what is implemented. But won't hurt if you verify.