--- stephan beal <[EMAIL PROTECTED]> wrote:
> On Monday 18 March 2002 20:00 pm, Diane Holt wrote:
> > --- Michael Laccetti <[EMAIL PROTECTED]> 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).
True. If you're needing to test on the actual value, then you'll have to
pass your "parameter" through <condition> first to set/not-set a property,
then use that property in your <include>/<exclude>.
For example:
<target name="copyfiles">
<condition property="excludeFoofiles" value="true">
<equals arg1="${parameter}" arg2="needed.value"/>
</condition>
<copy todir="${dest.dir}">
<fileset dir="${src.dir}">
<exclude name="**/*foo*" if="excludeFoofiles"/>
</fileset>
</copy>
</target>
Diane
=====
([EMAIL PROTECTED])
__________________________________________________
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>