ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scot P. Floess" <>
Subject Re: ant-contrib question
Date Sat, 05 Jan 2008 16:28:42 GMT
I agree too - this is an odd problem.  Here is what I tried:

I ran this on both Windows and Linux - it worked.

Here is the build.xml I was using:

<project default = "all" xmlns:ac="antlib:net.sf.antcontrib">

    <target name="all">
            <equals arg1 = "Scot"  arg2 = "Floess"/>

                <echo  message = "Sure does"/>

                <echo  message = "Sorry no dice"/>

I had a fresh install of Ant 1.7.0 and put ant-contrib-1.0b3.jar in 

A few things I'd look for:

    * Make sure, in fact the Ant contrib jar is in Ant's lib dir.
    * Make sure you don't have 2 versions of Ant installed.  By this I
      mean, you could have one version of Ant in /foo and another
      version in /bar.  You make changes to the version that lives in
      /bar.  However, the version that lives in /foo is the one in your
      path when calling the command "ant"

As Dominique pointed out, it does feel like a classpath issue.  That's 
why I say make sure you are affecting change to a version of Ant that is 
in your environment path.

Dominique Devienne wrote:
> On 1/4/08, Z W <> wrote:
>> I'm trying to use tasks in ant-contrid.
>> So I downloaded ant-contrib-1.0b3-bin and put ant-contrib-1.0b3.jar file in
>> $ANT_HOME\lib
>> [...]
>> xmlns:ac="antlib:net.sf.antcontrib">
>> [...]
>> [] Could not load definitions from resource
>> org/apache/tools/ant/antlib.xml. It could not be found.
> It's not complaining about Ant-Contrib's antlib.xml, but Ant's one,
> which is rather strange.
> Putting Ant-Contrib's jar in $ANT_HOME/lib and doing
> xmlns:ac="antlib:net.sf.antcontrib" should work (no need for a
> <taskdef>), so there's most likely something else at play, probably a
> classpath issue somehow... --DD
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-754-4592 (Work)

Chief Architect JPlate
Chief Architect JavaPIM
Architect Keras
QA Engineer OpenQabal

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message