Thursday, 31 January 2008

Add edited file back into an archive WAR/EAR

Note for myself (Windows Example)

1. Extract WAR file

jar xf myapplication.war

2. Edit the file you wish to change
3. Place new updated file back into archive

jar uf myapplication.war WEB-INF\web.xml

Now the WAR file will have the updated web.xml with the changes I made at step 2. It's vital the updated file is in the same directory structure that the archive is expecting otherwise you will end up with another file with the same name in a different path which is not what I need.

3 comments:

Anonymous said...

what I was looking for, thanks

Anonymous said...

Thank you!!!

As simple as I expected...

Abel

Anonymous said...

I needed that! Thank-tou.