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

Gradle does not handle well repositories that don't return 404 #12948

Open
ducrohet opened this issue Apr 28, 2020 · 2 comments
Open

Gradle does not handle well repositories that don't return 404 #12948

ducrohet opened this issue Apr 28, 2020 · 2 comments
Labels

Comments

@ducrohet
Copy link
Contributor

We have seen some badly configured maven repositories that don't return 404 on missing artifact and instead return a weird page. Example here.

When this happens, if the repo is ahead of the repo that does contain the artifact, then gradle will keep trying to download the pom again, and again, and again.

It would be nice to somehow improve the heuristic that decides whether the artifact is there or not. If the server returns something that looks like an HTML page rather than a POM, it could consider the artifact missing.
A less strict option would be to indicate to the users that it seems the repo is badly configured and to allow manually configuring said repo to consider non valid pom replies as 404.

@ljacomet
Copy link
Member

ljacomet commented May 4, 2020

@ducrohet That linked page seems to behave properly now.

There is no plan to change that behaviour in Gradle in the short / medium term. Aside from adding complexity on the Gradle side, it could also lead to complicated to diagnose failures. Especially if some of these were transient and cached.

Note that if you are impacted, you could leverage repository filtering so that you do not ping this repo for some modules.

@ljacomet ljacomet self-assigned this May 4, 2020
@ducrohet
Copy link
Contributor Author

ducrohet commented May 4, 2020

The main issue is that people don't know what's happening. all they see if Gradle keeps downloading stuff.
I reported this here because people don't know what is happening. I discovered this particular broken repo from a user who complained that Gradle "always downloads dependencies on every build".
I had them run a scan, I saw that it was a failed download of a pom, noticed the repo output and understood the problem, and provided work-arounds (re-order repo, use repo filtering).

Most users won't know what's going on. Can we at least make the error more verbose or something so that people can figure this out on their own?

@jjohannes jjohannes removed the @jvm label Mar 22, 2021
@ljacomet ljacomet removed their assignment Jul 7, 2021
@octylFractal octylFractal added in:dependency-resolution engine metadata and removed in:dependency-management DO NOT USE labels Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants