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:30:14 GMT
This is kind of a hack, but when you are modifying the bat file to place
your arguments, why not add a comment as well? Then later you can use a
fileset selector to see if the file contains your comment flag. If the
flag is present, then you have modified the file, if not, you haven't.


-----Original Message-----
From: Eric Dunn [] 
Sent: Tuesday, April 29, 2003 3:21 PM
To: 'Ant Users List'
Subject: RE: Design help

What is the definition of original though? Here is what you have
suggested as I understand it:

We have file A. 
We know it is orginal at this point.
We run my script in your way.
I save A to some other place, let's call it B.
So the script runs, and it modifies A to what updates I want. Great!
But I will need to check whether I have created B every time I run the
script (i.e. it was only supposed to
create the backup B ONE time)

So inherently its the same problem, I need to do a test on a situation.
I basically need to know if the
condition "alreadyMadeUntouchableOriginalCopy" is true. Am I
understanding you wrong? Sorry if I am.


-----Original Message-----
From: Claudio Corsi []
Sent: Tuesday, April 29, 2003 3:01 PM
To: Ant Users List
Subject: Re: Design help

You can still use the replaceregexp task but instead of editing the same
.bat file. You take
the original .bat file and copy to a located overriding what is their.
Then run the replaceregexp
on the file and run that file. This will insure that the new .bat file
is not being updated twice.

Eric Dunn wrote:
> Hi,
>      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
> 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.
> Thanks,
> Eric
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

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

View raw message