项目已部署,但未运行

时间:2014-04-20 17:04:26

标签: java eclipse spring maven

我根据工作项目设置了一个maven项目。使用Eclipse中的模板Dynamic Web Project创建Mine。我构建和部署这个maven项目没有错误。这是Eclipse控制台的输出:

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO] 
[INFO] --- maven-war-plugin:2.1.1:war (default-war) @ example ---
[INFO] Packaging webapp
[INFO] Assembling webapp [example] in [C:\Users\Kleber\Downloads\Projetos\example\target\example-0.0.1-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp resources [C:\Users\Kleber\Downloads\Projetos\example\src\main\webapp]
[INFO] Webapp assembled in [873 msecs]
[INFO] Building war: C:\Users\Kleber\Downloads\Projetos\example\target\example-0.0.1-SNAPSHOT.war
[INFO] 
[INFO] <<< tomcat7-maven-plugin:2.2:redeploy (default-cli) @ example <<<
[INFO] 
[INFO] --- tomcat7-maven-plugin:2.2:redeploy (default-cli) @ example ---
[INFO] Deploying war to http://localhost:8080/webappExample  
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Uploading: http://localhost:8080/manager/text/deploy?path=%2FwebappExample&update=true
Uploaded: http://localhost:8080/manager/text/deploy?path=%2FwebappExample&update=true (13855 KB at 17083.1 KB/sec)

[INFO] tomcatManager status code:200, ReasonPhrase:OK
[INFO] OK - Undeployed application at context path /webappExample
[INFO] OK - Deployed application at context path /webappExample
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.405s
[INFO] Finished at: Sun Apr 20 13:50:59 GMT-03:00 2014
[INFO] Final Memory: 15M/218M
[INFO] ------------------------------------------------------------------------

但是当我在浏览器中输入此项目的URL时,我收到404错误。然后我进入tomcat管理器并启动项目,并且无法启动错误'FAIL - 上下文路径/ webappExample中的应用程序'。

项目的完整代码可以在这里找到:

https://github.com/klebermo/maven_example

谁能说出我做错了什么?

1 个答案:

答案 0 :(得分:0)

所以,实际上我的问题是我的一个类的代码问题。我发现这是从控制台运行tomcat(我在Windows 8机器上)并分析输出。

我希望这个输出应该显示在eclipse控制台上,但我只看到Maven的输出。任何人都知道如何通过eclipse显示这两个输出,并避免操作系统控制台?