Classpath entry org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER will not be exported or published. Runtim

忘是亡心i 2021-09-26 04:04 432阅读 0赞

Eclipse里开发maven项目有如下警告的解决办法:

1、Description ResourcePath Location Type Classpath entry org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER will not be exported or published. Runtime ClassNotFoundExceptions may result. 项目名称P/项目名称Classpath Dependency Validator Message

2、DescriptionResource PathLocationType Classpath entry org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER will not be exported or published. Runtime ClassNotFoundExceptions may result. 项目名称P/项目名称Classpath Dependency Validator Message

解决办法:

打开navigator资源管理器, 修改下面的classpath文件:

Center

Center 1

  1. <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"> <attributes> <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/> </attributes></classpathentry>

项目上右键单击打开项目属性,如下操作:

Center 2

完成操作后点击ok,然后单击选中警告,并按ctrl+1/或者右键选择,解决问题

最后要是还存在就clean一下项目,彻底解决问题。

发表评论

表情:
评论列表 (有 0 条评论,432人围观)

还没有评论,来说两句吧...

相关阅读