在eclipse中发现jfinal的pom.xml出一个警告,位置在项目引用的父pom上:
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>7</version>
</parent>
提示:maven-enforcer-plugin (goal "enforce") is ignored by m2e.
查找相关资料发现应该是eclipse的m2e插件的问题,解决办法是在plugin中加入lifecycle-mapping插件即可。
<pluginManagement>
<plugins>
<!-- This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<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-enforcer-plugin</artifactId>
<versionRange>[1.0.0,)</versionRange>
<goals>
<goal>enforce</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
参考网页地址:https://blog.csdn.net/jdwl20090304/article/details/40107269
波总考虑是否要添加这个插件,有强迫症的人会总会想办法消除警告。
不过还是得谢谢你的反馈