You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Rum Pel <ru...@hotmail.com> on 2002/06/05 08:22:34 UTC

task - if

It would be great if every task has an 'if' clause. Currently
only 'target' task seems to have 'if'. (target isn't a task at all, right?).


I want to compile a source only if it is available.

<available file="src/A.java" property="A.is.present"/>

<javac src="src/A.java" if="A.is.present"/>

Can I do this with 1.4.1?

thanks,
--rp.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: task - if

Posted by Vikram Kulkarni <vk...@icope.com>.
    <antcall target="javaTask" />
where javaTask is the target to be run explicitly.

Regards,
vikram

----- Original Message -----
From: "Rum Pel" <ru...@hotmail.com>
To: "Ant Users List" <an...@jakarta.apache.org>
Sent: Wednesday, June 05, 2002 12:34 PM
Subject: Re: task - if


> > The <include>/<exclude> elements have 'if'/'unless' attributes.
>
> Thanks. And for java task, I can put it in a separate target. Is there
> a way to invoke a target explicitly?
>
> --rp
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: task - if

Posted by Rum Pel <ru...@hotmail.com>.
> The <include>/<exclude> elements have 'if'/'unless' attributes.

Thanks. And for java task, I can put it in a separate target. Is there
a way to invoke a target explicitly?

--rp

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: task - if

Posted by Diane Holt <ho...@yahoo.com>.
--- Rum Pel <ru...@hotmail.com> wrote:
> It would be great if every task has an 'if' clause. Currently
> only 'target' task seems to have 'if'. (target isn't a task at all,
> right?).
> 
> 
> I want to compile a source only if it is available.
> 
> <available file="src/A.java" property="A.is.present"/>
> 
> <javac src="src/A.java" if="A.is.present"/>
> 
> Can I do this with 1.4.1?

The <include>/<exclude> elements have 'if'/'unless' attributes.

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>