发牌SO 发表于 2017-3-1 12:10:47

maven中jetty插件配置

  maven中jetty插件的配置,可用于项目在内置jetty服务器中的部署。



<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<configuration>
<contextPath>/Demo1</contextPath>
<connectors>
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
<port>8088</port>
</connector>
</connectors>
<scanIntervalSeconds>10</scanIntervalSeconds>
</configuration>
</plugin>
  这样配置后我的项目在8088端口启动成功



Starting jetty 6.1.26 ...
jetty-6.1.26
No Transaction manager found - if your webapp requires one, please configure one.
Started SelectChannelConnector@0.0.0.0:8088
Started Jetty Server
Starting scanner at interval of 10 seconds.
restarting org.mortbay.jetty.plugin.Jetty6PluginWebAppContext@37e21f{/Demo1,E:\eclipse4.2\workspace\Demo1\src\main\webapp}
Webapp source directory = E:\eclipse4.2\workspace\Demo1\src\main\webapp
Reload Mechanic: automatic
Classes = E:\eclipse4.2\workspace\Demo1\target\classes
Context path = /Demo1
Tmp directory =determined at runtime
Web defaults = org/mortbay/jetty/webapp/webdefault.xml
Web overrides =none
web.xml file = E:\eclipse4.2\workspace\Demo1\src\main\webapp\WEB-INF\web.xml
Webapp directory = E:\eclipse4.2\workspace\Demo1\src\main\webapp
Reconfiguring scanner after change to pom.xml ...
No Transaction manager found - if your webapp requires one, please configure one.
Restart completed at Sun Apr 17 13:32:10 CST 2016
页: [1]
查看完整版本: maven中jetty插件配置