[maven]Multiple annotations found at this line
程序员文章站
2022-04-25 21:27:40
...
旧版本m2e插件报以下错:
[quote]
Multiple annotations found at this line:
- Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-
compiler-plugin:3.0:compile (execution: default-compile, phase: compile)
- Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-
compiler-plugin:3.0:testCompile (execution: default-testCompile, phase: test-compile)
[/quote]
解决办法,在pom中加入如下配置:
该解决办法有副作用,其中一个见:[url]http://vivus.iteye.com/blog/1741102[/url]
这是m2e插件的bug,建议还是升级m2e插件才是根本解决办法。
[quote]
Multiple annotations found at this line:
- Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-
compiler-plugin:3.0:compile (execution: default-compile, phase: compile)
- Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-
compiler-plugin:3.0:testCompile (execution: default-testCompile, phase: test-compile)
[/quote]
解决办法,在pom中加入如下配置:
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<versionRange>[2.0,)</versionRange>
<goals>
<goal>resources</goal>
<goal>testResources</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<versionRange>[2.0,)</versionRange>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
该解决办法有副作用,其中一个见:[url]http://vivus.iteye.com/blog/1741102[/url]
这是m2e插件的bug,建议还是升级m2e插件才是根本解决办法。
上一篇: XML文件报错:Multiple annotations found at this line:
下一篇: ImportError: cannot import name ‘_validate_lengths‘ 解决方法
推荐阅读
-
JSP报错:解决Multiple annotations found at this line
-
Multiple annotations found at this line:
-
XML文件报错:Multiple annotations found at this line:
-
[maven]Multiple annotations found at this line
-
Multiple annotations found at this line: cvc-complex-type.2.4.c- schema_reference.4
-
FAQ(70):Multiple annotations found at this line:
-
maven pom文件报错:Multiple annotations found at this line 解决方案
-
你的Jsp页面有黄×么,有黄色问号么?Multiple annotations found at this line: - Invalid location o
-
MyEclipse报错:Multiple annotations found at this line: - String cannot be resolved to a type解决方法实测