[英]Can't use Maven on Eclipse
I installed a new Eclipse EE 4.9
and downloaded the newest Maven. 我安装了新的
Eclipse EE 4.9
并下载了最新的Maven。 In Windwows->Preferences->Maven
: 在
Windwows->Preferences->Maven
:
->Installations
: I chose the freshly downloaded Maven ->Installations
:我选择了刚下载的Maven
->User Settings
: I chose [PATH-TO-MAVEN]\\conf\\settings.xml
->User Settings
:我选择了[PATH-TO-MAVEN]\\conf\\settings.xml
When I try to create a simple Maven project, I get that error: 当我尝试创建一个简单的Maven项目时,出现该错误:
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6 Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
无法计算构建计划:插件org.apache.maven.plugins:maven-resources-plugin:2.6或其依赖项之一无法解析:无法读取org.apache.maven.plugins:maven-resources-的工件描述符插件:jar:2.6插件org.apache.maven.plugins:maven-resources-plugin:2.6或其依赖项之一无法解析:无法读取org.apache.maven.plugins的工件描述符:maven-resources-plugin中:jar:2.6
Also, when I open the pom.xml
of that project, it says on the line with <packaging>
: 另外,当我打开该项目的
pom.xml
时,它与<packaging>
:
<project [...]>
[...]
<packaging>war</packaging> // <-- here seems to be an error
</project>
that there seems to be an error: 似乎有一个错误:
Multiple annotations found at this line:
在此行找到多个注释:
CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:3.1 or one of its dependencies could not be resolved: Failed to read artifact
CoreException:无法计算构建计划:插件org.apache.maven.plugins:maven-compiler-plugin:3.1或其依赖项之一无法解析:无法读取工件
descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:3.1: ArtifactResolutionException: Failure to transfer org.apache.maven.plugins:maven-compiler-plugin:pom:3.1 from https://org.apache.maven.plugins:maven-compiler-plugin:jar:3.1的描述符:ArtifactResolutionException:无法从https://传输org.apache.maven.plugins:maven-compiler-plugin:pom:3.1
repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced.repo.maven.apache.org/maven2已缓存在本地存储库中,只有在Central的更新间隔过去或强制进行更新之后,才会重新尝试解析。 Original error: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:3.1 from/to central ( https://repo.maven.apache.org/maven2 ): sun.security.validator.ValidatorException: PKIX path building
原始错误:无法将工件org.apache.maven.plugins:maven-compiler-plugin:pom:3.1从中央转移到中央( https://repo.maven.apache.org/maven2):sun.security.validator 。 ValidatorException:PKIX路径构建
failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target失败:sun.security.provider.certpath.SunCertPathBuilderException:无法找到到请求目标的有效证书路径
Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (execution: default-testCompile, phase: test-compile)
生命周期配置未涵盖插件执行:org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile(执行:default-testCompile,阶段:test-compile)
Does anybody have an idea? 有人有主意吗?
Looks like there is an issue going over https to the repo. 似乎有一个问题通过https到仓库。
ie sun.security.validator.ValidatorException: PKIX path building 即sun.security.validator.ValidatorException:PKIX路径构建
Check the version of Java you are using an ensure that you are not passing an incorrect path to the trust store.. 检查您使用的Java版本,确保您没有将错误的路径传递给信任库。
ie 即
-Djavax.net.ssl.trustStore -Djavax.net.ssl.trustStore
Have a look at https://confluence.atlassian.com/kb/unable-to-connect-to-ssl-services-due-to-pkix-path-building-failed-779355358.html as there are other resolutions at the bottom of the article.. 看看https://confluence.atlassian.com/kb/unable-to-connect-to-ssl-services-due-to-pkix-path-building-failed-779355358.html,因为还有其他解决方案文章底部
Just also noted that an issue similar to this has been discussed and anserwed in great detail @ Problems using Maven and SSL behind proxy .. 刚刚还指出,已经讨论并解决了与此类似的问题,并详细解决了@ 在代理后使用Maven和SSL的问题 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.