'mvn option to ignore Failed to read artifact and try other repos
Currently one of the repos is failing with a 502. A similar issue has been post before here:
jcenter 502 bad gateway after gradle refresh and jcenter.bintray.com is down Error: 502 Bad Gateway .
There error looks like:
[ERROR] Failed to execute goal on project my-project: Could not resolve dependencies for project my-project:1.0.0-SNAPSHOT: Failed to collect dependencies at my-dependency:jar:1.0.0-SNAPSHOT: Failed to read artifact descriptor for my-dependency:jar:1.0.0-SNAPSHOT: Could not transfer artifact some-other-project:1.0.0-SNAPSHOT from/to some-repo (some-repo's url): transfer failed for some-repo's url to some-other-project's pom, status: 502 Bad Gateway -> [Help 1]
I verified with --debug that for some reason it only tries the failing repo and none of the remaining repos in my ~/.m2/settings.xml
The artifact is availble in the surviving repositories. How do I tell maven to ignore this failure and move on? The repository is specified in a pom.xml which I prefer not to change.
Currently my workarounds is to modify the pom.xml locally to remove that repo and make sure I do not commit the change.
My preferences to the fix are:
- Ideally it would be a command line option, or
~/.m2/settings.xmlchange. I do not want to use--offlinesince I want mvn to use the other repos. - If not possible, then I will settle for a pom file change.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
