配置jetty9 maven 插件

 

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

你可能感兴趣的:(maven)