pom.xml 在 Eclipse 中显示多个注释错误

问题描述 投票:0回答:2

我可以从命令行构建项目,但是当我将它导入 Eclipse 时,我在 pom.xml 中出现以下错误:

Multiple annotations found at this line:
- Plugin execution not covered by lifecycle configuration: 
 org.apache.maven.plugins:maven-resources-plugin:2.6:testResources 
 (execution: default-testResources, phase: process-test-resources)
- Plugin execution not covered by lifecycle configuration: 
 org.apache.maven.plugins:maven-resources-plugin:2.6:resources 
 (execution: default-resources, phase: process-resources)

Eclipse Maven Integration 插件使用的是 Maven 版本

3.2.1
,我的系统也是使用相同的版本

此错误的原因可能是什么?怎么解决?

java eclipse maven m2eclipse
2个回答
0
投票
  1. 您应该安装或更新 M2Eclipse,即 Maven 集成
    日食
  2. 重启日食
  3. 删除项目并重新添加项目

这应该可以解决您的错误


0
投票

您可以尝试以下操作:

  1. 右键单击您的项目> Maven Clean Verify .
  2. 好吧,这看起来很奇怪但是;检查您的 pom.xml 文件编码。确保它是 UTF-8。另外,有一次,我尝试了这个并为我工作;我刚刚在 notepad++ 中再次保存了 pom.xml 文件。 (没有什么特别的,只是清除了一些空间以再次保存文件)在此之后,eclipse 没有给出关于 pom.xml 文件的错误。
© www.soinside.com 2019 - 2024. All rights reserved.