Java Mailing List Archive

http://www.ant-tasks.com/

Home » Ant Users List »

Re: Problem to use ant contrib

Peter Reilly

2008-04-30

Replies: Find Java Web Hosting

Author LoginPost Reply
Also, the taskdef defines a namespace uri (antlib:net.sf.antcontrib)
but the script does not bind this to a namespace prefix and in any
case does not use a namespace prefix with the <if> tag.

the definition should be something like this:
<taskdef resource="net/sf/antcontrib/antlib.xml"
        classpath="${lib}/antcontrib.jar"/>
<if>
...

or (ant 1.7)
<taskdef uri="antlib:net.sf.antcontrib"
        classpath="${lib}/antcontrib.jar"/>

<ac:if xmlns:ac=""antlib:net.sf.antcontrib">

..
</ac:if>


Peter


On Wed, Apr 30, 2008 at 9:54 AM, Stefan Bodewig <bodewig@(protected):
> On Wed, 30 Apr 2008, Fabien Dubois <fabien.dubois@(protected):
>
> >       <taskdef uri="antlib:net.sf.antcontrib"
> >       resource="net/sf/antcontrib/cpptasks/antlib.xml"
> >       classpath="${lib}/cpptasks.jar"/>
> >
> >         <if>
> >
>
> > Ant stops this task at the < if > (so there is no problem for the
> > taskdef):
>
> I don't think cpptasks.jar contains the if-task, you need the
> ant-contrib.jar for that.
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.