ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Lévy-Lambert <>
Subject AW: Modify files inside zip
Date Thu, 16 Oct 2003 10:35:58 GMT
With ant, you can :

- modify an xml file, using for instance the <replace/> task or some
combination of <copy/> with a nested filterchain, or also <replaceregexp/>
You might want to have templates for the xml files which you want to
customize, with the specific data (maybe usernames, passwords, hostnames,
...) identified by tokens beginning and ending with @, such as @host@,
@user@, @password@ which can then be processed by filtersets (a nested
element usable under copy or move). Actually, there is nearly too much
choice concerning ways of replacing data in text files with ant.

- replace one entry in a jar file with <jar update="true"
                                          <fileset dir="config">
                                             <include "**/*.xml"/>
- you cannot replace entries inside nested jars, that is, you need to work
on the jars which are nested in your ear, you cannot update directly a
config file which is in a jar, which is nested in an ear.

Hopes this helps,


-----Urspr√ľngliche Nachricht-----
Von: Patrick Martin []
Gesendet: Donnerstag, 16. Oktober 2003 12:14
An: 'Ant Users List'
Betreff: Modify files inside zip


In order to configure a J2EE server, I need to set some values in xml files
inside zip files (jar, war, ...). Actually, some of these zip files are even
inside an .ear file...

Does anyone have an idea on how to easily do that?

Confidentiality Notice: The information contained in this e-mail message is
intended only for the personal and confidential use of the recipient(s)
named above. If the reader of this message is not the intended recipient or
an agent responsible for delivering it to the intended recipient, you are
hereby notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is strictly
prohibited. If you have received this communication in error, please notify
us immediately by e-mail, and delete the original message.

Message confidentiel : Les informations contenues dans ce message sont
destinees a un usage personnel et confidentiel du destinataire indique
ci-dessus. Si le lecteur de ce message n'est pas le destinataire prevu, ou
n'est pas une personne en charge de le delivrer au destinataire voulu, vous
etes par la presente informe que vous avez recu ce document par erreur, et
que tout examen, transmission, distribution ou copie de ce message est
totalement interdit. Si vous avez recu cette communication par erreur, nous
vous remercions de bien vouloir nous avertir immediatement par e-mail et de
detruire le message d'origine.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message