Tomcat returns 404 for webapp in Eclipse

Tomcat returns 404 for webapp within Eclipse

我正在使用 Eclipse Mars (4.5.2),我安装了 Tomcat 8 作为 Web 服务器,并尝试在其上 运行 一个 Spring 应用程序。首先,Tomcat 管理页面没有加载,但是在我 'switched location' 之后,它显示了管理站点上的应用程序,但是如果我点击它,它 returns 404。如果我手动复制war 文件,它 运行s,如果我 运行 和

<plugin>
            <groupId>org.apache.tomcat.maven</groupId>
            <artifactId>tomcat7-maven-plugin</artifactId>
            <version>2.2</version>
            <configuration>
            <path>/dcollect</path>
                <url>http://localhost:8080/manager/text</url>
                <server>TomcatServer</server>
            <warFile>${project.build.directory}/dcollect.war</warFile>
                <username>admin</username>
                <password>admin</password>
            </configuration>
        </plugin>

whitin maven,它也工作得很好。

但是如果我 运行 和 'Run on server',它会在列表中显示该应用程序,但是 returns 404:

事实证明,eclipse 没有导出部署项目的 maven 依赖项。当首先打包到 WAR 时,它确实包含了它。我不得不做 "proyect properties -> deployment assembly -> add java build path entries -> maven dependencies".

我无法解释为什么 eclipse 没有自动包含它,而从 github 导入其他 Maven proyects 例如它确实包含。