You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Erik Hatcher <er...@ehatchersolutions.com> on 2004/01/14 09:44:18 UTC

antlib: cannot find ?

I'm slow to the namespace/antlib game, sorry.  And this is probably  
just an operator error.  I'm trying my first antlib.  Here is  
antlib.xml:

<?xml version="1.0"?>
<antlib>
   <taskdef name="index" classname="org.apache.lucene.ant.IndexTask"/>
</antlib>


And I'm using it like this:

<?xml version="1.0"?>
<project name="ant-example" default="index"  
xmlns:lucene="antlib:org.apache.lucene.ant">
   <property name="index.base.dir" location="build"/>
   <property name="files.dir" location="src/test"/>

   <target name="index">
     <mkdir dir="${index.base.dir}"/>

     <lucene:index index="${index.base.dir}/index">
       <fileset dir="${files.dir}"/>
     </lucene:index>
   </target>

</project>

And getting this error:

BUILD FAILED
/Users/erik/dev/jakarta/jakarta-lucene-sandbox/contributions/ant/ 
example.xml:31: The <antlib:org.apache.lucene.ant:index> type doesn't  
support the nested "fileset" element.

IndexTask definitely supports <fileset> and I can switch things back to  
using <taskdef> and all works fine.  For simplicity, I've copied the  
necessary JAR's over to ANT_HOME/lib for the time being, but once this  
works I'll move them out and use the -lib mechanism.

What am I doing wrong?

Thanks,
	Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: antlib: cannot find ?

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Jan 14, 2004, at 3:46 AM, Peter Reilly wrote:
>>     <lucene:index index="${index.base.dir}/index">
>>       <fileset dir="${files.dir}"/>
>
> This should be <lucene:fileset dir="${files.dir}"/>
>
> It was decided in the 1.6.beta series that nested elements found by
> reflection on the task object should be in the same namespace
> as the task.

Thanks!   That, of course, did the trick nicely.

	Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: antlib: cannot find ?

Posted by Peter Reilly <pe...@corvil.com>.
Erik Hatcher wrote:

> I'm slow to the namespace/antlib game, sorry.  And this is probably  
> just an operator error.  I'm trying my first antlib.  Here is  
> antlib.xml:
>
> <?xml version="1.0"?>
> <antlib>
>   <taskdef name="index" classname="org.apache.lucene.ant.IndexTask"/>
> </antlib>
>
>
> And I'm using it like this:
>
> <?xml version="1.0"?>
> <project name="ant-example" default="index"  
> xmlns:lucene="antlib:org.apache.lucene.ant">
>   <property name="index.base.dir" location="build"/>
>   <property name="files.dir" location="src/test"/>
>
>   <target name="index">
>     <mkdir dir="${index.base.dir}"/>
>
>     <lucene:index index="${index.base.dir}/index">
>       <fileset dir="${files.dir}"/>

This should be <lucene:fileset dir="${files.dir}"/>

It was decided in the 1.6.beta series that nested elements found by
reflection on the task object should be in the same namespace
as the task.

Peter

>     </lucene:index>
>   </target>
>
> </project>
>
> And getting this error:
>
> BUILD FAILED
> /Users/erik/dev/jakarta/jakarta-lucene-sandbox/contributions/ant/ 
> example.xml:31: The <antlib:org.apache.lucene.ant:index> type doesn't  
> support the nested "fileset" element.
>
> IndexTask definitely supports <fileset> and I can switch things back 
> to  using <taskdef> and all works fine.  For simplicity, I've copied 
> the  necessary JAR's over to ANT_HOME/lib for the time being, but once 
> this  works I'll move them out and use the -lib mechanism.
>
> What am I doing wrong?
>
> Thanks,
>     Erik
>
>
> ---------------------------------------------------------------------
> 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