ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stephan beal <step...@einsurance.de>
Subject Re: gnoob question: if
Date Tue, 19 Mar 2002 09:13:42 GMT
On Monday 18 March 2002 20:00 pm, Diane Holt wrote:
> --- Michael Laccetti <michael@is-inc.ca> wrote:
> > It's a bit more in depth than that.  I actually was looking for
> > something embedded within a target block.  I pass in a parameter, and
> > based on it's value, I want to copy certain files only.  Anything fit
> > the bill?
>
> The <include> and <exclude> tags also allow for if/unless.

But be aware that those won't do "exactly" what you're asking - to do 
something based on the VALUE of a property. if/unless work if (unless) the 
property is set to ANY value (including false).

i believe you can do what you're asking with something like this:

<target name="othertarget">
  <property name='mycommand' value='ls -la'/>
  <antcall target='foo'/>
</target>

<target name="foo">
  <exec command="${mycommand}"/>
</target>



----- stephan
Generic Universal Computer Guy
stephan@einsurance.de - http://www.einsurance.de
Office: +49 (89)  552 92 862 Handy:  +49 (179) 211 97 67
"I ain't gen'rally given to physicality of that nature but it saves
a lot of arguing." -- Nanny Ogg

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message