You need the ability to treat the jar as a writable virtual file system. 
Reportedly 

TrueZip and Java 7 can do that. See, e.g., 

http://docs.oracle.com/javase/7/docs/technotes/guides/io/fsp/zipfilesystemprovider.html

http://blogs.oracle.com/xuemingshen/entry/the_zip_filesystem_provider_in1




>________________________________
> From: Allen Riddle <allenrid...@gmail.com>
>To: users@buildr.apache.org 
>Sent: Tuesday, December 20, 2011 11:39 PM
>Subject: Modifying contents of jar file
> 
>All,
>
>Does anyone have any idea how I can modify a the contents of a built jar?
>I have an asssembler project that creates 3 different zip files.  There is
>a Spring application context file that I need to override for each archive.
>Any thoughts on how to best do this?  I'm currently looking into the unzip
>method in conjunction with copying the file in question.  Thanks.
>

Reply via email to