You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Detlef Brendle <de...@canoo.com> on 2001/09/07 11:21:52 UTC
howto use conditions
hi I wanna execute unzip if and only if the zip file exists.
my target looks like
<project>
...
<available file="${ConfigDir}A/${ConfigName}-srsc.zip"
property="DeltaAExists"/>
...
<target name="UnzipBaseLine" if="BaseLineExists">
<unzip src="${ConfigDir}/${ConfigName}-src.${FileExtension}"
dest="${DestinationDir}" />
</target>
...
</project>
it doesnt work - Ant says unexpected <available token.
do I have to make a new target.?
detlef
Re: howto use conditions
Posted by Diane Holt <ho...@yahoo.com>.
The <available> task can't be used at the project level (I think it should
be, but that suggestion got turned down). You'll need to put your
<available> in a target, which your UnzipBaseLine target then depends on.
Diane
--- Detlef Brendle <de...@canoo.com> wrote:
> hi I wanna execute unzip if and only if the zip file exists.
>
> my target looks like
> <project>
> ...
> <available file="${ConfigDir}A/${ConfigName}-srsc.zip"
> property="DeltaAExists"/>
> ...
> <target name="UnzipBaseLine" if="BaseLineExists">
> <unzip src="${ConfigDir}/${ConfigName}-src.${FileExtension}"
> dest="${DestinationDir}" />
> </target>
> ...
> </project>
>
> it doesnt work - Ant says unexpected <available token.
>
> do I have to make a new target.?
>
> detlef
>
=====
(holtdl@yahoo.com)
__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com