摆脱POM未找到警告组织.eclipse.m2e:生命周期映射
为了让m2e 1.0正常工作,我必须指定生命周期映射:
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
<versionRange>[2.0.2,)</versionRange>
<goals>
<goal>process</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
但后来我得到这个警告:
[WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0
例如,如果我运行一些特定的maven任务(如果我只运行,那么就没有这样的消息)mvn clean install findbugs:findbugs
mvn clean install
我知道问题是这个POM不存在,因为它只被定义为保存映射信息。(未找到 m2e 生命周期映射))
无论如何,我想保持我的构建干净,没有任何警告,所以我如何摆脱这个特定的?(我的 CI 服务器检查是否没有警告。)
我使用Maven 3.0.2,也尝试了Maven 3.0.3,但结果相同。