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

Eclipse裏開發maven項目有如下警告的解決辦法:

1、Description Resource Path 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、Description Resource Path Location Type 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文件:



<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>


項目上右鍵單擊打開項目屬性,如下操作:



完成操作後點擊ok,然後單擊選中警告,並按ctrl+1/或者右鍵選擇,解決問題

最後要是還存在就clean一下項目,徹底解決問題。


總結:發現問題,解決問題。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章