Hot deploy war maven project in embedded tomcat

1.4k views Asked by At

I have maven war project.

I know inplace. it deploys to a given server. But i want to deploy on embedded tomcat and dont want to restart everytime. just say

for first time run deploy

Then change some java class and say redeploy. All in embedded tomcat.

Is this possible ?

2

There are 2 answers

0
Olivier Lamy On

Maybe you can have a look at the executable war/jar feature see http://tomcat.apache.org/maven-plugin-2/executable-war-jar.html So that will produce a simple jar which contains tomcat classes. You will be able to simply run: java -jar pathtofile.jar.

0
prunge On

Could the Tomcat Maven Plugin help with this?

You can use it by using the command tomcat:run

This page describes how to set up your POM/settings to make calling the plugin easier (using a prefix vs having to use full groupId/artifactId of plugin on the command line).