问题描述:
从SVN下载maven项目后,发现缺少了Maven Dependencies,无论如何update project,clean,convert to maven....都无效。
解决:
检查项目的.classpath 文件,发现缺少了maven的classpathentry设置。
javaSE项目添加如下代码:
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
web项目添加:
<classpathentry 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>