ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Todd McGrath <>
Subject Re: Updating a XML file during build
Date Tue, 11 Jul 2000 15:43:44 GMT

--- Stefan Bodewig <> wrote:
> >>>>> "TM" == Todd McGrath <>
> writes:
>  TM> It would be nice to update the "version"
> attribute of this file
>  TM> during the build.
> would replace or keysubst or the filter behavior of
> copydir help?
> Stefan

Yes, good idea.  I was originally going to use replace
(I'm using it already to update "import" locations in
.java files), but because it is an XML file it's going
to be a little different.  

I started writing task based on replace, but it would
be specifically for XML files, because 1) I need the
XML practice and 2) this what the XML config looks
like this:

<default-key type="string">Build Information|Version
<default-value type="string"></default-value>

So, I could use the replace task and set the token to and version to  


Actually this reminds me of something.  Right now, I'm
moving to ant from a bunch PERL build scripts. 
Currently, I pass the version number in as a command
line arg.  

Will I be able to pass in the version number arg in
the ant build script?


Do You Yahoo!?
Get Yahoo! Mail  Free email you can access from anywhere!

View raw message