2

I am unable to build a project through eclipse but it works fine when I run mvn clean install. I am getting the following issue.

Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install (default-install) on project abc-xxx: Execution default- install of goal org.apache.maven.plugins:maven-install-plugin:2.4:install failed: Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.maven.plugins:maven-install-plugin:jar:2.4 -> org.codehaus.plexus:plexus-utils:jar:3.0.5: Failed to read artifact descriptor for org.codehaus.plexus:plexus-utils:jar:3.0.5: Could not transfer artifact org.codehaus.plexus:plexus-utils:pom:3.0.5 from/to anonymous (https://nexus.xxx.xxx.xxx/nexus/content/groups/xxx): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target 
1
  • What java version are you using? Commented Feb 10, 2015 at 20:23

1 Answer 1

11

Make sure the JDK you are using in the command line is the same that you are using in your IDE.

In the command line type:

java -version 

Then inside eclipse:

 windows -> preferences -> Installed JREs 

The same goes for maven:

In the command line type:

mvn -version 

In eclipse:

 windows -> preferences -> Maven -> User settings windows -> preferences -> Maven -> Installations 
Sign up to request clarification or add additional context in comments.

2 Comments

Maven version was different on eclipse which I set up and now working. Thanks :)
Thank you! This was the problem, now it works great. :D

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.