I am using maven for my webapplication to build, start and handle the libraries. So I run tomcat7:run to develop my application... But if I change the code the tomcat will not automatic reload the code changes, so I need to restart. Before maven I use the "Sysdeo Eclipse Tomcat Launcher plugin" to run and create my project. This plugin allows to the see code changes instant and I know that the PLAY! Framework do the same. So it is possible to configure maven to reload my code changes on running? I will improve my work progress...
It is possible to automatically reload code changes by making sure the Tomcat context is reloadable.
The tomcat7:run
goal allows you to enable context reloading with the contextReloadable
parameter which must be configured in the configuration
section of the plugin:
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<contextReloadable>true</contextReloadable>
</configuration>
</plugin>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With