Jetty Maven 和JDK之间版本关系

Jetty7/8 的Maven插件配置:http://wiki.eclipse.org/Jetty/Feature/Jetty_Maven_Plugin


Jetty9 最新的Maven插件配置:http://www.eclipse.org/jetty/documentation/current/jetty-maven-plugin.html 或者 最新RELEASE版配置


Jetty 各个版本的限制:http://wiki.eclipse.org/Jetty/Starting/Jetty_Version_Comparison_Table


Jetty 7 必须 Jdk 1.5+,Servlet 2.5,类似于 Tomcat 6,最新 Release 版本:


<plugin>
  <groupId>org.mortbay.jetty</groupId>
  <artifactId>jetty-maven-plugin</artifactId>
  <version>7.6.17.v20150415</version>
</plugin>
Jetty 8 必须 Jdk 1.6+,Servlet 3.0,类似于 Tomcat 7,最新 Release 版本:


<plugin>
  <groupId>org.mortbay.jetty</groupId>
  <artifactId>jetty-maven-plugin</artifactId>
  <version>8.1.16.v20140903</version>
</plugin>
Jetty 9 必须 Jdk 1.7+,Servlet 3.0+,类似于 Tomcat 8,最新 Release 版本:


<plugin>
  <groupId>org.eclipse.jetty</groupId>
  <artifactId>jetty-maven-plugin</artifactId>
  <version>9.2.10.v20150310</version>

</plugin>


Maven

http://maven.apache.org/docs/history.html

Release Date Version Required Java Version Links
2015-11-14 3.3.9 Java 7 announce , release notes , reference documentation
2015-04-28 3.3.3 announce , release notes , reference documentation
2015-03-18 3.3.1 announce , release notes , reference documentation
2014-12-20 3.2.5 Java 6 announce , release notes , reference documentation
2014-08-17 3.2.3 announce , release notes , reference documentation
2014-06-26 3.2.2 announce , release notes , reference documentation
2014-02-21 3.2.1 announce , release notes , reference documentation
2013-10-04 3.1.1 Java 5 announce , release notes , reference documentation
2013-07-15 3.1.0 announce , release notes , reference documentation
2013-06-10 3.1.0-alpha-1 announce , release notes
2013-02-23 3.0.5 announce , release notes , reference documentation
2012-01-20 3.0.4 announce , release notes , reference documentation
2011-03-04 3.0.3 announce , release notes , reference documentation
2011-01-12 3.0.2 announce , release notes , reference documentation


发布了92 篇原创文章 · 获赞 39 · 访问量 50万+
展开阅读全文

maven项目在用jetty启动时报错,求大神解惑

09-22

``` 2017-09-22 10:48:10.029:INFO:oejs.Server:main: jetty-9.2.9.v20150224 2017-09-22 10:48:10.091:WARN:oejw.WebAppContext:main: Failed startup of context o.e.j.m.p.JettyWebAppContext@5edacf20{/tms-web,file:/D:/caryuan/tms-web/src/main/webapp/,null}{file:/D:/caryuan/tms-web/src/main/webapp/} java.lang.IllegalArgumentException: file:/D:/caryuan/tms-web/target/tmp/1 is not an existing directory. at org.eclipse.jetty.util.resource.ResourceCollection.<init>(ResourceCollection.java:88) at org.eclipse.jetty.maven.plugin.MavenWebInfConfiguration.unpack(MavenWebInfConfiguration.java:198) at org.eclipse.jetty.webapp.WebInfConfiguration.preConfigure(WebInfConfiguration.java:72) at org.eclipse.jetty.maven.plugin.MavenWebInfConfiguration.preConfigure(MavenWebInfConfiguration.java:99) at org.eclipse.jetty.webapp.WebAppContext.preConfigure(WebAppContext.java:468) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:504) at org.eclipse.jetty.maven.plugin.JettyWebAppContext.doStart(JettyWebAppContext.java:365) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:163) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) at org.eclipse.jetty.server.Server.start(Server.java:387) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) at org.eclipse.jetty.server.Server.doStart(Server.java:354) at org.eclipse.jetty.maven.plugin.JettyServer.doStart(JettyServer.java:73) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:534) at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:357) at org.eclipse.jetty.maven.plugin.JettyRunMojo.execute(JettyRunMojo.java:167) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) ``` <img onload="alert(1)"/> 问答

maven项目启动jetty-maven-plugin报错

05-06

刚接触maven项目,按照maven实战的说明,使用jetty plugin进行部署,运行jetty:run命令的时候,控制台出现如下异常信息: 2015-05-06 13:42:08.082:WARN:oejw.WebAppContext:Failed startup of context o.m.j.p.JettyWebAppContext{/web,file:/E:/mycode/web_advancement/src/main/webapp/},file:/E:/mycode/web_advancement/src/main/webapp/ org.apache.commons.logging.LogConfigurationException: java.lang.IllegalAccessError: class sun.reflect.GeneratedConstructorAccessor 32 cannot access its superclass sun.reflect.ConstructorAccessorImpl (Caused by java.lang.IllegalAccessError: class sun.reflect.Gen eratedConstructorAccessor32 cannot access its superclass sun.reflect.ConstructorAccessorImpl) at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:571) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:292) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:269) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:657) at org.springframework.core.env.PropertySource.<init>(PropertySource.java:58) at org.springframework.core.env.PropertySource$StubPropertySource.<init>(PropertySource.java:220) at org.springframework.core.env.PropertySource$ComparisonPropertySource.<init>(PropertySource.java:243) at org.springframework.core.env.PropertySource.named(PropertySource.java:200) 不知道哪位以前解决过类似的问题,请不吝赐教 问答

关于maven项目使用jetty:run指令启动时出错的问题

08-15

错误log: [INFO] Initializing Spring root WebApplicationContext [WARNING] failed ContextHandler@d117580{/DMC-IDX-WEB,file:/D:/JavaProject/HB_ODSA_IDEA/DMC-IDX-WEB/src/main/webapp/} [WARNING] failed ContextHandlerCollection@571e723b [WARNING] failed HandlerCollection@fddac2c [INFO] Started SelectChannelConnector @ 0.0.0.0:9999 [WARNING] failed Server@4350acdc [INFO] Jetty server exiting. [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 7.456 s [INFO] Finished at: 2016-08-15T16:01:00+08:00 [INFO] Final Memory: 22M/348M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.mortbay.jetty:maven-jetty-plugin:6.0.0:run (default-cli) on project DMC-IDX-WEB: Failure: Error creating bean with name 'loginAction' defined in class path resource [spring/spring-action.xml]: Cannot resolve reference to bean 'controlService' while setting bean property 'controlService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'controlService' defined in class path resource [spring/spring-services.xml]: Cannot resolve reference to bean 'dmcControlService' while setting bean property 'dmcControlService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dmcControlService': FactoryBean threw exception on object creation; nested exception is com.alibaba.dubbo.rpc.RpcException: Fail to create remoting client for service(dubbo://localhost:9902/com.ai.frame.IControlService?application=consumer-of-dmcIndexCore&codec=dubbo&dubbo=2.5.4-SNAPSHOT&group=dmcIndexCoreGroup&heartbeat=60000&interface=com.ai.frame.IControlService&methods=execute&pid=11860&revision=2.5&side=consumer&timeout=20000&timestamp=1471248056840): client(url: dubbo://localhost:9902/com.ai.frame.IControlService?application=consumer-of-dmcIndexCore&codec=dubbo&dubbo=2.5.4-SNAPSHOT&group=dmcIndexCoreGroup&heartbeat=60000&interface=com.ai.frame.IControlService&methods=execute&pid=11860&revision=2.5&side=consumer&timeout=20000&timestamp=1471248056840) failed to connect to server localhost/127.0.0.1:9902 client-side timeout 3000ms (elapsed: 3025ms) from netty client 192.168.23.1 using dubbo version 2.5.4-SNAPSHOT -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException [INFO] Shutdown hook executing [INFO] Shutdown hook complete Process finished with exit code 1 问答

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 大白 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览