0

I just installed centOS7 and trying to package on of my Java Maven projects

I do a

mvn package

and I get the following error.. can someone please tell me how to find it

[ERROR] Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from/to central (https://repo.maven.apache.org/maven2): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1]
[ERROR]
JMS
  • 183
  • 2
  • 9
  • This is a CA issue. Your keystore doesn't have the certificates needed to construct the trust chain for the certificate presented by that server. Searching online should find any number of people having this problem with any number of sites and should find guides to fixing it (and more importantly guides to using the `keytool` tool you will have to use, a tool I find utterly horrible to work with). – Etan Reisner Oct 08 '14 at 20:18
  • possible duplicate of [Resolving javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed Error?](http://stackoverflow.com/questions/9619030/resolving-javax-net-ssl-sslhandshakeexception-sun-security-validator-validatore) – Etan Reisner Oct 08 '14 at 20:20

2 Answers2

1

Guess you are behind a proxy. If so, Maven needs your proxy configured in its settings file (settings.xml) of the local maven repo that you are using.

If that doesn't work, dump your maven local repository and force it to re-download all its dependencies.

Sinash
  • 11
  • 1
0

I'm running Ubuntu 15 without a proxy, and also hit this issue. The answer was in a certificate issue I found at

maven-with-ubuntu-15-10-getting-errors-with-mvn-clean-install

From that other post, you want to run;

update-ca-certificates -f
Community
  • 1
  • 1
Ben
  • 313
  • 4
  • 8