Details
-
Type:
Improvement
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 6.2.0pre0, 7.0.0pre4, 6.1.12.rc2
-
Component/s: Maven
-
Labels:None
-
Number of attachments :
Description
With modern JVMs supporting class hot-swapping, causing webapps to reload for every change is not necessary nor productive. That is, with a small change, you'd rather have your IDE reload the class without having Jetty reload the webapp, but with a larger change, hot-swapping won't work, so you'd rather have jetty reload the webapp.
Currently, jetty maven plugin cannot be fine-tuned for this kind of set up.
It would be nice if I can manually reload the web app, by perhaps hitting ENTER on the console. Maven has an abstraction for doing user interaction (see the release plugin for example), so this should be doable.
I guess the workaround would be to nominate one file and have Jetty monitor it, and run the touch command to trigger a reload.
I made some modifications to the plugin and now it can reload the context when someone hits ENTER on the console.
I don't know if it will be applied to the trunk. Anyway, just apply to rev 2228 and add the following configuration in your POM:
<plugins>
...
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<configuration>
...
<newLineScan>true</newLineScan> <!-- <<< here -->
...
</configuration>
</plugin>
...