配置jetty9 maven 插件

使用Jetty的Maven插件可以实现项目的快速开发与测试。通过在pom.xml中配置jetty-maven-plugin,该插件能够周期性地扫描项目变更并自动重新部署Web应用,大大提升了开发效率。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

Jetty 的Maven插件适合快速开发和测试。

The Jetty Maven plugin is useful for rapid development and testing. You can add it to any webapp project that is structured according to the usual Maven defaults. The plugin can then periodically scan your project for changes and automatically redeploy the webapp if any are found. This makes the development cycle more productive by eliminating the build and deploy steps: you use your IDE to make changes to the project, and the running web container automatically picks them up, allowing you to test them straight away.

http://eclipse.org/jetty/documentation/current/jetty-maven-plugin.html

实现在pom.xml 加上jetty-maven-plugin

<plugin>
  <groupId>org.eclipse.jetty</groupId>
  <artifactId>jetty-maven-plugin</artifactId>
  <version>9.2.2.v20140723</version>
    <configuration>
    <scanIntervalSeconds>10</scanIntervalSeconds>
  </configuration>
</plugin>

 

然后运行

mvn jetty:run

 jetty 默认配置会加载下面的资源,并不需要配置太多

 

    resources in ${project.basedir}/src/main/webapp

    classes in ${project.build.outputDirectory}

    web.xml in ${project.basedir}/src/main/webapp/WEB-INF/

 

 

http://laravel.iteye.com/blog/2178623

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值