Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to update a war file safely

ziggy25Dec 18 2009 — edited Dec 18 2009
Hi,

I have a war file that has some files in it. I would like to update the war file to replace an existing web.xml file and add a new file in a different directory.
I know that i can simply unzip the file and make the changes then zip it back again.

I would like to do this using Ant but i was wondering if it is possible to do the update with only the updated files. I think the way ANT would work is it would check every file on the new directory and replace it if it is newer. The problem i have is i dont have copies of the existing files in the war file. I only have the files i want to replace in the war file. If i try it, will i end up with a new war file with just the new files and everything else deleted or will it just update the new file?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 15 2010
Added on Dec 18 2009
2 comments
345 views