我在我的项目中使用 Maven 构建。我在我们的本地网络中有一个公司关系存储库。此存储库通过 https 托管。
我在从 Eclipse 访问此存储库时遇到问题。
显示的错误是:
Multiple annotations found at this line:
- Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (execution: default-compile, phase: compile)
- CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:2.5.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor
for org.apache.maven.plugins:maven-compiler-plugin:jar:2.5.1: ArtifactResolutionException: Failure to transfer org.apache.maven.plugins:maven-compiler-plugin:pom:2.5.1 from https://
NexusServer/nexus/content/groups/CLM/ was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced. Original
error: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:2.5.1 from/to nexus (https://NexusServer/nexus/content/groups/CLM/):
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
- Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:2.5.1:testCompile (execution: default-testCompile, phase: test-compile)
我用谷歌搜索了一下,找到了一个在运行 maven build 时通过证书的解决方案。我下载了证书并使用 -Djavax.net.ssl.trustStore=Path/To/My/KeyStore 将其传递给 maven
命令行工具工作正常。但是,我仍然无法在 Eclipse 中使用 maven 构建项目。
Maven 不会从本地存储库下载新的依赖项。
提前感谢您的帮助!
普拉博德