I'm using ant 1.8.2 and I have a large Ear file.
Slight changes to the ear are needed, depending on user selection during install.
At the end of the install process, I run an ant script which updates the ear based on the user's selections. These files are only to be included in the ear, if the user has related licensing... so the update is necessary.
Currently I'm exploding the whole ear, adding the necessary files, then making the updated ear.
I'm hoping to find a way in which I can remove and/or add files without having to go through the whole unzip/update/zip process.
@oers thanks for the suggestion, the following is the POC I used to add a file to an ear and replace the application.xml file.
The ear task has an
update
attribute, which you can set to true.This way files will be added to the existing zipfile, instead of creating a new one.