Maven项目使用Jetty启动之后发生如下错误:

日期: 2016-7-19


错误内容描述:

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Spring_Struts_HibernateWebProject 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ Spring_Struts_HibernateWebProject ---
[INFO] Deleting E:\Java Work\Java Source\Spring_Struts_HibernateWebProject\target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ Spring_Struts_HibernateWebProject ---
[WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ Spring_Struts_HibernateWebProject ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ Spring_Struts_HibernateWebProject ---
[WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ Spring_Struts_HibernateWebProject ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ Spring_Struts_HibernateWebProject ---
[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ Spring_Struts_HibernateWebProject ---
[INFO] Building jar: E:\Java Work\Java Source\Spring_Struts_HibernateWebProject\target\webDemo.jar
[INFO] 
[INFO] >>> jetty-maven-plugin:9.2.7.v20150116:run (default) > test-compile @ Spring_Struts_HibernateWebProject >>>
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ Spring_Struts_HibernateWebProject ---
[WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ Spring_Struts_HibernateWebProject ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ Spring_Struts_HibernateWebProject ---
[WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ Spring_Struts_HibernateWebProject ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] <<< jetty-maven-plugin:9.2.7.v20150116:run (default) < test-compile @ Spring_Struts_HibernateWebProject <<<
[INFO] 
[INFO] --- jetty-maven-plugin:9.2.7.v20150116:run (default) @ Spring_Struts_HibernateWebProject ---
[INFO] Logging initialized @8318ms
[INFO] Configuring Jetty for project: Spring_Struts_HibernateWebProject
[INFO] webAppSourceDirectory not set. Trying src\main\webapp
[INFO] webAppSourceDirectory E:\Java Work\Java Source\Spring_Struts_HibernateWebProject\src\main\webapp does not exist. Trying E:\Java Work\Java Source\Spring_Struts_HibernateWebProject\target\webapp-tmp
[INFO] Reload Mechanic: automatic
[INFO] Classes = E:\Java Work\Java Source\Spring_Struts_HibernateWebProject\target\classes
[INFO] Context path = /
[INFO] Tmp directory = E:\Java Work\Java Source\Spring_Struts_HibernateWebProject\target\tmp
[INFO] Web defaults = org/eclipse/jetty/webapp/webdefault.xml
[INFO] Web overrides =  none
[INFO] web.xml file = null
[INFO] Webapp directory = E:\Java Work\Java Source\Spring_Struts_HibernateWebProject\target\webapp-tmp
[INFO] jetty-9.2.7.v20150116
[INFO] Started o.e.j.m.p.JettyWebAppContext@29528a22{/,file:/E:/Java%20Work/Java%20Source/Spring_Struts_HibernateWebProject/target/webapp-tmp/,AVAILABLE}{file:/E:/Java%20Work/Java%20Source/Spring_Struts_HibernateWebProject/target/webapp-tmp/}
[WARNING] !RequestLog
[INFO] Started ServerConnector@249e0271{HTTP/1.1}{0.0.0.0:8080}
[INFO] Started @10162ms
[INFO] Started Jetty Server


1、之后有一个类似的问题有解决: http://stackoverflow.com/questions/12271187/how-to-override-web-xml-in-jetty-maven-plugin-when-filtering


2、https://vaadin.com/forum/#!/thread/9122376/9122375;


这个问题暂时没有解决。


之后换了tomcat之后问题得以解决,我想是不是由于我本机没有安装jetty的缘故。虽然在执行"mvn jetty:run"之后提示started jetty Server。但是在浏览器输入

http://localhost:8080/Spring_Struts_HibernateProject之后提交没有反应。










你可能感兴趣的:(Maven学习总结_old,java,maven)