2015-02-10 113 views
0

我無法通過eclipse建立一個項目,但它運行良好,當我運行mvn乾淨安裝。我收到以下問題。mvn安裝不在eclipse中工作,但從命令行工作正常

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 
+0

您正在使用哪種Java版本? – 2015-02-10 20:23:27

回答

6

確保JDK您使用的命令行是一樣的,你正在使用你的IDE

在命令行鍵入:

java -version 

然後在蝕:

windows -> preferences -> Installed JREs 

這同樣適用於行家

在命令行鍵入:

mvn -version 

在Eclipse:

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

Maven版本在我設置並正在工作的eclipse上不同。謝謝:) – user3417380 2015-02-10 21:01:53

+0

謝謝!...這個效果很好。 – Dinesh 2015-10-18 12:36:33

+0

謝謝!這是問題,現在它運作得很好。 :d – 2015-10-19 14:19:44

相關問題