I tested and commited the patch that does updating of the war or zip file.
You can use TestCustomization file for testing. The variables required to be passed are zip file required to be updated and HashMap where keys are internal files for updating and value is also HashMap with stringToReplace as a key and replacementString as a value. Result file will be with the same as zip but in temp directory.
* another about generating J2EE archives for different environments and more generally a proposal to support modifying any type of zip file using regexps. See http://tinyurl.com/le5mq
I've just had the idea of merging the two proposals in one. Imagine the
* Ability to take a dir or a zip file as input
* Generate a new zip/dir or the same zip/dir but updated
* Customizations brought on files/input streams.
This would allow all sort of use cases and would solve our issue of custom configurations + the issue of customizing J2EE archives for any environment.
* Define a Customization interface
- takes an input stream source
- generate an output stream destination
- apply a set of transformations to the input stream
* Several Customization implementations possible
* A CustomizationPack to regroup several Customization together and to work on zips or directories. Several implementations:
* Modify the LocalConfiguration interface to add a new API:
* Refactor current Ant token filters in configuration code to use the AntTokenCustomization class and define a default pack for each container's configuration. Users customization packs could be added after the default pack.
Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international. Téléchargez sur http://fr.messenger.yahoo.com