3

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.

9
  • (Also, is there a Stack Exchange site where this question would belong better?)
    – Jonik
    Jul 27, 2011 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, 2011 at 17:53
  • 2
    Why don't you just generate a war file with the name ROOT.war?
    – DoubleMalt
    Jul 29, 2011 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, 2011 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. Jan 25, 2012 at 13:36

1 Answer 1

-2

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

1
  • 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, 2011 at 12:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .