This error generally occurs when Maven could not download dependencies. Possible causes for this error are:
- The POM misses the declaration of the
<repository>
which hosts the artifact. - 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. - The remote repository in question uses SSL and the JVM running Maven does not trust the certificate of the server.
- There is a general network problem that prevents Maven from accessing any remote repository, e.g. a missing proxy configuration.
- You have configured Maven to perform strict checksum validation and the files to download got corrupted.
- 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:
2 Comments
Ben Gidley
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.
joe choosakul
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!