ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tharp, Joshua L, SOLGV" <>
Subject RE: Design help
Date Tue, 29 Apr 2003 22:05:58 GMT
Have you considered having a "source" bat file and just include tokens
in it (i.e. @TOKEN@)? Then you run a replace or copy on the "source" bat
with a filter and those tokens will be replaced with the correct values.
Conversely, if the tokens have already been replaced, then you won't
find any @TOKEN@ strings in your bat file and nothing will happen.


-----Original Message-----
From: Eric Dunn [] 
Sent: Tuesday, April 29, 2003 3:03 PM
To: ''
Subject: Design help

     I am trying ot figure out how to do this correctly. I want to edit
a .bat file, looking for a specific
java call and adding a command line arguement, and something its command
line specified classpath.

So I tried replaceregexp and I it works right, but if my customer runs
it twice it has no way to check if it
already made the change. 

So I installed "Antelope" with its "if\else" tasks but it seems to check
properties. I need a property that
dynamically is set by perhaps some custom task like
"FileContains(filename,searchstring" so that the if\else
task in antelope can use it an decide whether to run my replaceregexpr.

Is this the right train of thought? Should I just write some monster
custom ant task to just read the file
myself, do java conditional logic, and insert if appropriate? I am
pretty close to doing that.


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

View raw message