SnowDream
SnowDream

Reputation: 11

Maven jetty plugin,how to do this:modify the class with out restart server

Some days early,my pm asked us to use maven and jetty to development and debug the app,but i had never used them any more. Right now , i can't to hot deploy the app with out restart the jetty,if i modify the app with restart the jetty every time ,i will be crazy.It waste lot of time.

So,i hope somebody can help me that,how to config this.

Thanks.

Upvotes: 1

Views: 725

Answers (2)

When I was using maven 2 and maven jetty plugin 7.4.5 it worked fine, but after migrating to maven 3 it didn't work anynore. A simple -yet not optimal solution- that i found in another forum consists in using this entry in the configuration of the plugin:

<reload>manual</reload>

Althoug it doesn't fix the issue of automatically hot-redeploying your app if any change is detected, it allows you to restart you app by simply hitting the "enter" key.

Upvotes: 1

tommy chheng
tommy chheng

Reputation: 9228

This is my jetty-maven-plugin setting. When you recompile your code, the plugin will check every 10 secs to reload the new classes.

  <plugin>
    <groupId>org.mortbay.jetty</groupId>
    <artifactId>jetty-maven-plugin</artifactId>
    <version>7.4.5.v20110725</version>
    <configuration>
      <scanIntervalSeconds>10</scanIntervalSeconds>
    </configuration>
  </plugin>

Upvotes: 1

Related Questions