昨天一不留神,把Maven Dependencies给移除掉了。一阵痛苦...!

1:找到工程的上一个版本

2:直接替换你的.classpath文件

3:找到工程-右键-Maven-Update Project...  Alt+F5

4:找到工程-右键-Build Path-Configure Build Path...在 LiBraries列表中 是不是已经看到了Maven Dependencies。

maven项目移除Maven Dependencies后如何在添加进去

 

如果你的工程已经没有了上一个版本

1:打开.classpath文件,加入如下代码

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>