Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

maven tomcat deploy plugin so that no rebuild is done

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?

like image 715
Michael Wiles Avatar asked Sep 30 '11 14:09

Michael Wiles


People also ask

What is tomcat7 Maven plugin?

The Tomcat7 Maven Plugin provides goals to manipulate WAR projects within the Tomcat servlet container version 7.x.

How do I deploy a Maven project from Tomcat to eclipse?

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.

Does maven have Tomcat?

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.


2 Answers

You can use deploy-only goal, which won't invoke the package build lifecycle.

like image 62
Eugene Kuleshov Avatar answered Sep 25 '22 23:09

Eugene Kuleshov


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
like image 22
PapaFreud Avatar answered Sep 22 '22 23:09

PapaFreud