Ant WAR Task & WEB-INF in lowercase

If you use the Ant war task to create, well, war files, and you notice that the resulting archive has a lowercase WEB-INF folder, it’s a not a bug with Ant, as the documentation states:

We regulary receive bug reports that this task is creating the WEB-INF directory, and thus it is our fault your webapp doesn’t work. The cause of these complaints lies in WinZip, which turns an all upper-case directory into an all lower case one in a fit of helpfulness. Please check that jar xvf yourwebapp.war shows the same behaviour before filing another report.

Easy fix. Open up WinZip and click Options –> Configuration and then check the option for ‘Allow all upper case file names’.
Winzip Options Menu

This entry was posted in J2EE. Bookmark the permalink.

6 Responses to Ant WAR Task & WEB-INF in lowercase

  1. Tom Klaasen says:

    Thanks! Just stumbled over this one. Luckily you’re second on Google’s “ant web-inf” query.

  2. tobi says:

    very helpful, thanks for posting

  3. tony says:

    Thanks for posting – solved my issue

  4. Edgar says:

    Thank you. Incredibly helpful. We have been debugging this issue for a while now, and this will help us get toward the real problem.

  5. Mark says:

    Thank you very much indeed, I was about to get my hammer from the garage and introduce it to the keyboard.

  6. webber says:

    Thanks! that was very helpful post

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>