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?
The Tomcat7 Maven Plugin provides goals to manipulate WAR projects within the Tomcat servlet container version 7.x.
Right-click the maven project, click Run As —> Run Configurations menu item. Input clean install tomcat7:deploy in the Goals input text box deploy maven project to tomcat. Click Run button, when you see BUILD SUCCESS in the output console, that means the maven deploy to tomcat server process complete successfully.
Like many of its functionalities, Maven provides Tomcat-specific goals through the use of independently developed plugins. There are currently two Tomcat plugins available for Maven.
You can use deploy-only goal, which won't invoke the package
build lifecycle.
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
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