A Gradle-based example project demonstrating hot-deploy of a Java web application to a dockerized Tomcat.
Build *.war
via Gradle (continuous mode):
./gradlew -t build
Deploy to dockerized Tomcat:
docker-compose up
Access demo:
Try this:
-
Change the source π©πΌβπ»
-
Watch how Gradle re-builds the
war
file π -
Watch how Tomcat re-deploys the web app π«
-
Refresh the browser π
-
See your changes & celebrate! β¨
The provided docker-compose.yml already contains the configuration necessary for remote debugging via JPDA (Java Platform Debugger Architecture).
Use your favorite IDE to connect to the target VM via localhost:8000
:
Try this:
-
Set a breakpoint in your source π
-
Refresh the browser π
-
Use the debugger to step through your code π
Licensed under MIT License.
Β© Rahel LΓΌthy 2019