更新时间:2022-11-29 15:58:34
我建议迁移到 Eclipse 3.7.x (Indigo),它对 m2e 有更好的支持,并且还允许您使用 WTP 的 Maven 集成(单独安装),这应该会让事情变得更容易.我想你的大部分问题应该通过更新到 Indigo 来解决.
I would recommend to move to Eclipse 3.7.x (Indigo), which has better support for m2e, and also allows you to use the Maven Integration for WTP (separate install), which should make things a lot easier. I guess most of your problems should be solved by updating to Indigo.
安装链接:http://marketplace.eclipse.org/node/96737
另见此处:Eclipse Indigo/3.7 中的 Maven/Tomcat 项目
编辑将您的网络资源放在 WebContent 下,然后将其作为目录添加到 WAR 插件中可能是一个解决方案.干净的方法是将它们放在 src/main/resources
或 src/main/webapp
下,它们应该自动包含在 WAR 文件中.WebContent
不是 Maven 的标准目录之一.
Edit
Putting your web resources under WebContent and then adding that as a directory in the WAR plugin may be a solution. The clean way would be to have them under src/main/resources
or src/main/webapp
and they should be included automatically in the WAR file. WebContent
is not one of Maven's standard directories.