用eclipse创建maven项目后,在Deployment Assembly中通过Add...->Java Build Path Entries导入Maven Dependencies时,发现Maven Dependencies不存在,可以通过如下方法解决:
打开.classpath文件,添加如下内容

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

 

注:修改Faceted Project时,点击Further configuration available…,弹出Modify Faceted Project窗口,此处是设置web.xml文件的路径,我们输入src/main/webapp。

相关文章:

  • 2018-02-20
  • 2021-05-25
  • 2022-12-23
  • 2022-12-23
  • 2021-09-04
  • 2021-06-01
  • 2022-12-23
  • 2021-08-18
猜你喜欢
  • 2022-12-23
  • 2021-08-25
  • 2022-12-23
相关资源
相似解决方案