本文介绍了在KEPLER Eclipse上的POM.xml中出现错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了基于Maven的Web应用程序,因此在创建应用程序后,我在pom.xml中遇到了两个错误

I have created maven based web application so after created application i am getting two errors in pom.xml which are

1.在此行找到多个注释: -无法从 http:/转移org.apache.maven.plugins:maven-resources-plugin:pom:2.6 /repo.maven.apache.org/maven2 已缓存在本地存储库中,不会重新尝试解析 直到Central的更新间隔过去或强制更新为止.原始错误:无法从/到中心转移工件org.apache.maven.plugins:maven-resources-plugin:pom:2.6(http:// repo.maven.apache.org/maven2):对 http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.6/maven-resources-plugin- 2.6.pom

1.Multiple annotations found at this line: - Failure to transfer org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from http://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. Original error: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from/to central (http:// repo.maven.apache.org/maven2): null to http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.6/maven-resources-plugin-2.6.pom

2.在此行找到多个注释: -生命周期配置未涵盖的插件执行:org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile(执行:default-testCompile,阶段:test-compile) -生命周期配置未涵盖的插件执行:org.apache.maven.plugins:maven-compiler-plugin:3.1:compile(执行:默认编译,阶段:编译) -CoreException:无法计算构建计划:插件org.apache.maven.plugins:maven-compiler-plugin:3.1或其依赖项之一无法解析:无法读取以下产品的工件描述符 org.apache.maven.plugins:maven-compiler-plugin:jar:3.1:ArtifactResolutionException:无法传输org.apache.maven.plugins:maven-compiler-plugin:pom:3.1

2.Multiple annotations found at this line: - Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (execution: default-testCompile, phase: test-compile) - Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (execution: default-compile, phase: compile) - 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 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

请让我知道解决该问题需要做什么

Could you please let me know what needs to be done for resolving the issue

推荐答案

如果您遇到我在上面的评论中描述的相同问题,那么似乎可以通过将mvn eclipse:eclipse设置为Eclipse项目文件夹的工作目录来解决此问题即

If you are facing the same issue I described in my comment above then it seems I could fix it by running mvn eclipse:eclipse with working directory set to Eclipse project folder i.e.

$ cd /path/to/eclipse/workspace/Project
$ mvn eclipse:eclipse

这对您有用吗?也许您的环境有所不同.提供更多详细信息可能会帮助其他人更好地理解您的问题,从而提供有用的建议.

Does this work for you ? Maybe your environment is different . Providing more details might help others to understand your problem even better so as to offer useful suggestions .

这篇关于在KEPLER Eclipse上的POM.xml中出现错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 08:18