This error generally occurs when Maven could not download dependencies. Possible causes for this error are:

  1. The POM misses the declaration of the <repository> which hosts the artifact.
  2. The repository you have configured requires authentication and Maven failed to provide the correct credentials to the server. In this case, make sure your ${user.home}/.m2/settings.xml contains a <server> declaration whose <id> matches the <id> of the remote repository to use. See the Maven Settings Reference for more details.
  3. The remote repository in question uses SSL and the JVM running Maven does not trust the certificate of the server.
  4. There is a general network problem that prevents Maven from accessing any remote repository, e.g. a missing proxy configuration.
  5. You have configured Maven to perform strict checksum validation and the files to download got corrupted.
  6. Maven failed to save the files to your local repository, see LocalRepositoryNotAccessibleException for more details.

In case of a general network-related problem, you could also consult the following articles:

  • No labels

2 Comments

  1. In Maven 3 if you just had a failed download and have fixed it (e.g. by uploading the jar to a repository) it will cache the failure. To force a refresh add -U to the command line.

  2. I was running a Jenkins build job for Adobe CQ and had the "hostname in certificate didn't match: <repo.adobe.com>"  error.    I upgraded Maven(from 3.2.1 to 3.5.0) in Jenkins and it solved my issue.    My Jenkins build for Adobe CQ is working now.    Thanks!