You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Robert Nicholson <ro...@elastica.com> on 2004/01/31 16:07:01 UTC
Flags with available
Tomcat-5's build.xml has a rule like the following.
<target name="check.source">
<available property="source.exists"
file="${basedir}/${tomcat.project}" type="dir" />
</target>
<target name="get.source" unless="source.exists">
<antcall target="checkout" />
</target>
however, there are actually many things it should be checking not just
tomcat.project
so I wanted to ask how in Ant can you write the rule in such a way that
it sets source.exists
to false only if one of those items isn't present. So as soon as it
finds one dependency that
doesn't exist it should abort checking for the others because it would
reset source.exists if the other dependencies do.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Flags with available
Posted by Robert Nicholson <ro...@elastica.com>.
Sounds like it would be thanks for the reference.
On Feb 1, 2004, at 1:39 PM, Antoine Lévy-Lambert wrote:
> Robert Nicholson wrote:
>
>> Tomcat-5's build.xml has a rule like the following.
>>
>> <target name="check.source">
>>
>> <available property="source.exists"
>> file="${basedir}/${tomcat.project}" type="dir" />
>>
>> </target>
>>
>> <target name="get.source" unless="source.exists">
>>
>> <antcall target="checkout" />
>>
>> </target>
>>
>> however, there are actually many things it should be checking not
>> just tomcat.project
>> so I wanted to ask how in Ant can you write the rule in such a way
>> that it sets source.exists
>> to false only if one of those items isn't present. So as soon as it
>> finds one dependency that
>> doesn't exist it should abort checking for the others because it
>> would reset source.exists if the other dependencies do.
>>
>>
>>
> Hi Robert,
>
> you may want to look at the condition task, which has nested <and>
> <or> <not> .... This might be what you are looking for.
>
>
> Antoine
>
>
> ---------------------------------------------------------------------
> 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
Re: Flags with available
Posted by Antoine Lévy-Lambert <an...@antbuild.com>.
Robert Nicholson wrote:
> Tomcat-5's build.xml has a rule like the following.
>
> <target name="check.source">
>
> <available property="source.exists"
> file="${basedir}/${tomcat.project}" type="dir" />
>
> </target>
>
> <target name="get.source" unless="source.exists">
>
> <antcall target="checkout" />
>
> </target>
>
> however, there are actually many things it should be checking not just
> tomcat.project
> so I wanted to ask how in Ant can you write the rule in such a way
> that it sets source.exists
> to false only if one of those items isn't present. So as soon as it
> finds one dependency that
> doesn't exist it should abort checking for the others because it would
> reset source.exists if the other dependencies do.
>
>
>
Hi Robert,
you may want to look at the condition task, which has nested <and> <or>
<not> .... This might be what you are looking for.
Antoine
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org