maven tomcat deploy plugin so that no rebuild is done
-
05-02-2021 - |
Question
I use jenkins to build my gwt app, now I want to run a tomcat:deploy on that built project so that it can deploy the built war to tomcat.
Problem is it insists on doing a package beforehand even though the package was just done.
This causes a gwt recompile - this takes a Very long time.
Is there a way I can invoke a deploy to tomcat with maven that will simply deploy an already existing war?
Solution
You can use deploy-only goal, which won't invoke the package
build lifecycle.
OTHER TIPS
Mre generally, check out the list of Maven Tomcat Plugin Goals
Doing a sequence of
mvn tomcat:undeploy
mvn tomcat:deploy-only
is essentially a "redeploy without building" which you sometimes want to do to see what happens at startup. Although if you really just want to see the webapp start up, there's
mvn tomcat:reload