Maven项目中找不到maven dependencies library

一般是,workspace中的.classpath文件中有内容丢失造成

<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
        <attributes>
            <attribute name="maven.pomderived" value="true"/>
        </attributes>
 </classpathentry>

下面添加:

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

重新启动eclipse 或者switch workspace到当前workspace即可解决。

原文地址:https://www.cnblogs.com/antis/p/5391731.html