解决Eclipse Maven项目中不显示Maven Dependencies依赖
一、问题描述
1、Eclipse在引入或创建Maven工程后,不显示Maven Dependencies,如下图所示:

二、问题解决
1、Ctrl+Shift+R 输入 .classpath , 添加下面2中代码至 .classpath 文件中。

2、添加如下代码至 .classpath 文件中
<classpathentry exported="true" kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
3、然后 选中项目 Refresh ,即可解决问题。
感恩原作者: https://blog.youkuaiyun.com/Lin_xiaofeng/article/details/78803527
修复Eclipse Maven依赖缺失

本文介绍了解决Eclipse中Maven项目不显示MavenDependencies的问题。通过编辑.classpath文件并添加特定XML代码,再刷新项目,即可使依赖正常显示。
7659

被折叠的 条评论
为什么被折叠?



