Eclipse下通过Maven的Jetty插件运行Web工程的配置,包括启动https

来源:互联网 发布:域名公安局备案 编辑:程序博客网 时间:2024/05/18 02:29

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 版本:

?
1
2
3
4
5
<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 版本:

?
1
2
3
4
5
<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 版本:

?
1
2
3
4
5
<plugin>
  <groupId>org.eclipse.jetty</groupId>
  <artifactId>jetty-maven-plugin</artifactId>
  <version>9.2.10.v20150310</version>
</plugin>

国内很多应用也许会去升级JDK版本,但往往还在使用Servlet2.5做开发,所以本文使用 Jetty 8 作为案例。


0 0