Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
(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
2  
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 '12 at 13:36

1 Answer 1

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.)

share|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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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