ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: ant property not set question
Date Mon, 16 Apr 2007 14:56:58 GMT
This works for me:

<project>

    <property environment="env"/>
    <property name="is.dev.home" value="${env.IS_DEV_HOME}"/>

    <fail message="IS_DEV_HOME/is.dev.home variable is not set.">
        <condition>
            <equals arg1="${is.dev.home}" arg2="$${env.IS_DEV_HOME}"/>
        </condition>
    </fail>
    <echo>'${is.dev.home}'</echo>

</project>



Jan 

>-----Urspr√ľngliche Nachricht-----
>Von: Dominique Devienne [mailto:ddevienne@gmail.com] 
>Gesendet: Freitag, 13. April 2007 23:18
>An: Ant Users List
>Betreff: Re: ant property not set question
>
>On 4/13/07, Philip Swenson <pswenson@webmethods.com> wrote:
>> I have a property that is declared like this:
>>     <property name="is.dev.home" value="${env.IS_DEV_HOME}"/>
>
>You must wrap your <property> above inside a <target name="..."
>if="env.IS_DEV_HOME" unless="is.dev.home">, to only set is.dev.home
>when it's not already set, and only when IS_DEV_HOME env. var does
>exist. Or use Ant-Contrib's <ac:if> to avoid the additional <target>,
>with the <isset> condition. --DD
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>

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


Mime
View raw message