2011-10-24 71 views
1

我使用下面的配置到tomcat朗姆酒7与Maven404问题与Apache Maven的Tomcat插件为Tomcat 7

<plugin> 
    <groupId>org.apache.tomcat.maven</groupId> 
    <artifactId>tomcat7-maven-plugin</artifactId> 
    <version>2.0-SNAPSHOT</version> 
    <configuration> 
     <path>/${project.build.finalName}</path> 
    </configuration> 
</plugin> 

它工作正常 ,突然现在试图用mvn tomcat7:run

时,试图访问:

http://localhost:8080/myapp

或任何页面的应用程序,我只是得到404错误

任何想法,为什么我面临这样的问题?

+0

请帮忙吗? –

+0

没有想法?是容易还是奇怪的问题? –

回答

0

我正面临类似的问题。我的解决方案只与实际插件略有关系。

我已升级到2.0-beta-1。

该插件隐藏了控制台输出中的实际错误。

我用“旧”的tomcat插件(mvn tomcat:run)运行,它显示我的问题。

我的applicationContext.xml没有被加载,并且该错误被吞下。

+0

哪里可以找到最新版本的插件? –

+0

http://tomcat.apache.org/maven-plugin.html – DaShaun

+0

我有这个相同的问题。不幸的是,我不能运行老版本的tomcat插件,因为它会抛出无关的错误(由于我的应用程序只能在tomcat7上运行) – droope