Friday, August 26, 2011

use latest jetty server with mvn

when we run jetty:run,mvn will add following plugin in your pom file

<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>

<version>6.1.21</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
</configuration>
</plugin>

we can change this to following to use latest jetty,like jetty 7

<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>

<configuration>
<scanIntervalSeconds>3</scanIntervalSeconds>
</configuration>
</plugin>

we can change code and resource,jetty will detect that,it point to webapp in src folder,not target folder,so no need to run package

No comments:

Post a Comment