During downloading dependencies by maven, one of it fails due to network issues:

Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-failsafe-plugin/2.16/maven-failsafe-plugin-2.16.pom
Plugin org.apache.maven.plugins:maven-failsafe-plugin:2.16 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-failsafe-plugin:jar:2.16

I would like to retry it for n times where n will be configurable. How can I do this?

1 Answers

JF Meier On

Let me suggest an alternative solution:

Set up a Nexus or Artifactory server in your local network. Let your builds run through it. It will cache all the artifacts that were used so that the risk of running into network problems dramatically decreases.