Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

deploying a versioned WAR file to tomcat

Tags:

maven-2

tomcat

I was wondering what would be the best practice to deploy a maven packaged WAR file to tomcat. Using maven release plugin I get a versioned war file for my project eg: myservice-1.0.0.war

I would like to deploy it to tomcat so that I can access it as follows eg: http://localhost:8080/myservice

By default tomcat explodes the war file as a directory with a name myservice-1.0.0 under CATALINA_HOME/webapps. But I want to to explode the war as a directory with a name myservice for the reasons mentioned above.

I know I can simply rename myservice-1.0.0.war >> myservice.war and then deploy it in Tomcat.

I wanted to find out what others do?

like image 273
andthereitgoes Avatar asked Oct 07 '10 16:10

andthereitgoes


1 Answers

I would do it by mentioning myservice as artifactId and final name and using maven cargo plugin to deploy to tomcat. http://cargo.codehaus.org/Maven2+Plugin+Tips

like image 166
Ankit Bansal Avatar answered Nov 16 '22 02:11

Ankit Bansal