[英]mvn install is not working in eclipse but works fine from command line
I am unable to build a project through eclipse but it works fine when I run mvn clean install.我无法通过 eclipse 构建项目,但是当我运行 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
Make sure the JDK you are using in the command line is the same that you are using in your IDE .确保您在命令行中使用的JDK与您在IDE中使用的相同。
In the command line type:在命令行输入:
java -version
Then inside eclipse:然后在日食里面:
windows -> preferences -> Installed JREs
The same goes for maven : Maven 也是如此:
In the command line type:在命令行输入:
mvn -version
In eclipse:在日食中:
windows -> preferences -> Maven -> User settings
windows -> preferences -> Maven -> Installations
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.