Re: newbie - if-then-else task?

2001-12-04 Thread Russ Fink
I tried the other way, using depends and targets. It is REALLY long, not succinct, and IMHO can lead to severe maintenance problems in the long run - therefore, I advocate leaving the available tag just the way it is. To do what I wanted using depends and targets, it roughly works like this

Re: newbie - if-then-else task?

2001-12-04 Thread Diane Holt
--- Russ Fink [EMAIL PROTECTED] wrote: I tried the other way, using depends and targets. It is REALLY long, not succinct, Well, the way you did it is a bit more roundabout than you really need. For example (this one assumes the file is required): target name=copyFile depends=noFile

Re: newbie - if-then-else task?

2001-12-04 Thread Steve Loughran
- Original Message - From: Russ Fink [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 04, 2001 7:19 PM Subject: Re: newbie - if-then-else task? I tried the other way, using depends and targets. It is REALLY long, not succinct, and IMHO can lead to severe maintenance

newbie - if-then-else task?

2001-12-03 Thread Russ Fink
Hello, I'm new at Ant and I will describe what I want to do -- followed with how I hope to do it. I'm trying to copy files from two sources, a system directory followed by a local directory. This is prior to a build, and I'm modifying an existing build file. What I want is to copy a file

Re: newbie - if-then-else task?

2001-12-03 Thread Diane Holt
You can use available. It doesn't just set a flag -- you can assign any value to the property it's (potentially) setting, so have the value be the path to the file it finds, then reference that property in your copy task. If you can use a nightly build rather than a release, you can do this more

Re: newbie - if-then-else task?

2001-12-03 Thread Erik Hatcher
- if-then-else task? You can use available. It doesn't just set a flag -- you can assign any value to the property it's (potentially) setting, so have the value be the path to the file it finds, then reference that property in your copy task. If you can use a nightly build rather than a release, you

Re: newbie - if-then-else task?

2001-12-03 Thread Russ Fink
Okay - I think I understand. If I have 'dirs.orig' pointing to the global area, and dirs.local pointing to the local modified area, and want to put the file into 'dest', I can do the following: property name=frompath value=${dirs.orig}/foo/ available file=${dirs.local}/foo property=frompath