ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zulq Alam" <>
Subject RE: Requiring multiple properties to be set
Date Mon, 19 Nov 2001 05:23:17 GMT

If I understand correctly, would 

<target name="t1" if="p1"/>
<target name="t2" if="p2"/>
<target name="t3" if="p3"/>
<target name="t4" depends="t1, t2, t3"/>

not solve your problem?


-----Original Message-----
From: Laurie Harper []
Sent: 19 November 2001 04:43
Subject: Requiring multiple properties to be set

Hi, I'm trying to figure out how to make an Ant robust.  The target
requires several properties to be set externally.  If there was only one
property, I could just do:

  <target name="xxx" if="property"/>

But I have three properties.  I tried this:

  <target name="xxx" if="p1,p2,p3"/>

but it doesn't work.  Next I tried something like this:

  <target name="xxx" depends="xxx-config" if="xxx-configured"/>
  <target name="xxx-config">
    <condition property="xxx-configured">
        <not><equals arg1="\$\{p1\}" arg2="${p1}/></not>
        <not><equals arg1="\$\{p2\}" arg2="${p2}/></not>
        <not><equals arg1="\$\{p3\}" arg2="${p3}/></not>

but apparently Ant doesn't support escaping like this.  Is there a way
to do this?  Either an escaping convention that'll make my second
attempt work, or some other method?

If there isn't, would adding support for a list of properties in 'if'
and 'unless' attributes, like in my first attempt, be a possible future


zodiac(@)holoweb!net  | "If that's too much initiative for the company
ICQ# 78724820         |  handle, I don't want to work for them anyway."

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

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

View raw message