Is there any way to deploy my Java application .war file at root on Tomcat 7 server, using the Deploy plugin for Jenkins?

Currently the app gets deployed at http://server/foo/ if it comes in a file named foo.war.

link|improve this question

78% accept rate
(Also, is there a Stack Exchange site where this question would belong better?) – Jonik Jul 27 '11 at 12:24
For now, I used this workaround: move webapps/ROOT to another name; do the deployment via Jenkins by executing a shell script that copies the war file under webapps with the name ROOT.war. Anyway, I'll leave the question open; it would be nice (and less of a hack) to be able to do this with the Deploy plugin. – Jonik Jul 27 '11 at 17:53
Why don't you just generate a war file with the name ROOT.war? – DoubleMalt Jul 29 '11 at 21:29
@DoubleMalt: Good point... If that works with the Deploy plugin too, I'm going to feel a little stupid. I'll try it when back at work (in a few weeks). – Jonik Aug 1 '11 at 15:41
@Jonik Did you get this to work ? I am tryign to deploy my ROOT.war to tomcat using jenkins. And its not working. – NimChimpsky Jan 25 at 13:36
show 4 more comments
feedback

1 Answer

Overly simple solution for any problem such as this:

Set your appBase for the host container to the path you want. (Make sure to turn off autodeploy, etc.)

link|improve this answer
I changed appBase (with help from here) but that doesn't seem to work. That changes the dir under which Tomcat looks for apps to deploy, but the app still gets deployed at http://server/foo. Also, this breaks http://server/manager/text/list that the Deploy plugin depends upon. – Jonik Jul 27 '11 at 12:47
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.