簡體   English   中英

mvn install 在 Eclipse 中不起作用,但在命令行中工作正常

[英]mvn install is not working in eclipse but works fine from command line

我無法通過 eclipse 構建項目,但是當我運行 mvn clean install 時它工作正常。 我遇到以下問題。

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

確保您在命令行中使用的JDK與您在IDE中使用的相同。

在命令行輸入:

java -version

然后在日食里面:

 windows -> preferences -> Installed JREs

Maven 也是如此

在命令行輸入:

mvn -version

在日食中:

 windows -> preferences -> Maven -> User settings
 windows -> preferences -> Maven -> Installations

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM