from:http://www.myexception.cn/web/792650.html

eclipse中maven web工程打包成war(发布到tomcar)时lib中没有jar包的解决方法

可能有两个原因:

1、maven中某些jar包下载不下来

 从其他地方下载jar文件放到相应maven本地库的.m2里

2、.classpath文件中缺少(下面代码的作用是制定maven的jar发布路径)

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

-------------------------------------------------------------------------------转载结束--------------------------------------------------------------------------

我遇到的问题的解决办法是:工程右键-》属性-》Deployment Assembly-》Add...(Java Build Path Entries,点进去选择Maven Dependencies)。