Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/eclipse/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java mvn安装在eclipse中不起作用,但在命令行中可以正常工作_Java_Eclipse_Spring_Maven - Fatal编程技术网

Java mvn安装在eclipse中不起作用,但在命令行中可以正常工作

Java mvn安装在eclipse中不起作用,但在命令行中可以正常工作,java,eclipse,spring,maven,Java,Eclipse,Spring,Maven,我无法通过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-p

我无法通过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中使用的JDK相同

在命令行类型中:

java -version
mvn -version
然后在eclipse内部:

 windows -> preferences -> Installed JREs

这同样适用于maven

在命令行类型中:

java -version
mvn -version
在eclipse中:

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

确保在命令行中使用的JDK与在IDE中使用的JDK相同

在命令行类型中:

java -version
mvn -version
然后在eclipse内部:

 windows -> preferences -> Installed JREs

这同样适用于maven

在命令行类型中:

java -version
mvn -version
在eclipse中:

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

您使用的是什么java版本?您使用的是什么java版本?Maven版本在eclipse上是不同的,我已经设置好了,现在正在工作。谢谢:)谢谢!这就是问题所在,现在效果很好DMaven版本在eclipse上是不同的,我已经设置好了,现在正在工作。谢谢:)谢谢!这就是问题所在,现在效果很好D