简体   繁体   English

不能在Eclipse上使用Maven

[英]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.

相关问题 Eclipse maven 插件,无法更新索引 - Eclipse maven plugin, can't update index Eclipse找不到Maven依赖包 - Eclipse can't find Maven dependency package 为什么我不能在Eclipse中新创建的maven webapp项目中使用New-> Source Folder? - Why I can't use New->Source Folder in a new created maven webapp project in Eclipse? 无法使用Eclipse,Maven和适用于Maven的Android插件编译应用程序 - Can't compile an application using Eclipse, Maven, and the Android Plugin for Maven Eclipse无法在不在eclipse中的jenkins上解析自己的Maven构建 - Eclipse can't resolve own maven builds on jenkins which are not in eclipse 不能在日食中使用杰克逊 - Can't use Jackson in eclipse 是什么导致 Eclipse 中导入的 Maven 项目默认使用 Java 1.5 而不是 Java 1.6,我如何确保它不会? - What causes imported Maven project in Eclipse to use Java 1.5 instead of Java 1.6 by default and how can I ensure it doesn't? 我可以从 Eclipse 使用 Maven,但不能从命令行使用 - I can use Maven from Eclipse, but not from command line 使用eclipse / netbeans时,可以使用Maven进行构建吗? - when using eclipse/netbeans, can you make it use the maven to build? 如何使用Maven下载的软件包来使eclipse使用? - How can I make eclipse make use of packages downloaded by maven?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM