创建Maven工程转web工程,使用tomcat启动时,Maven dependency引入的jar包无效问题

来源:互联网 发布:数据流程图怎么画 编辑:程序博客网 时间:2024/05/16 06:32
找到工程下面的.classpath文件,发现下面一段配置:
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"><attributes><attribute name="maven.pomderived" value="true"/></attributes></classpathentry>

maven转换web工程后,如果Maven dependency引入的jar包无效,则添加红色部分配置:

<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"><attributes><attribute name="maven.pomderived" value="true"/><span style="color:#FF0000;"><attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/></span></attributes></classpathentry>
问题解决。

0 0
原创粉丝点击