ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Edwards <...@ben-edwards.com>
Subject Re: Custom Tasks/Types in 1.6.2
Date Mon, 08 Nov 2004 19:17:41 GMT

Specifically, I provide the following taskdef:

<taskdef 
   name="filelister" 
   classname="antTest.FileListerTask"
/>

And then use it:

<filelister>
   <fileset dir="antWorkspace" includes="**/*" />
</filelister>

And I get a NullPointerException when using Ant 1.6.2, but 
things work fine when using 1.6.0.  I'm running the program 
from Eclipse 3.0.  The antTest.FileListerTask is in the 
project's classpath.

Stack trace follows...

	at org.apache.tools.ant.Task.perform(Task.java:373)
	at org.apache.tools.ant.Target.execute
(Target.java:341)
	at org.apache.tools.ant.Target.performTasks
(Target.java:369)
	at org.apache.tools.ant.Project.executeTarget
(Project.java:1214)
...
Caused by: java.lang.NullPointerException
	at 
org.apache.tools.ant.IntrospectionHelper.supportsNestedElemen
t(IntrospectionHelper.java:767)
	at org.apache.tools.ant.UnknownElement.handleChild
(UnknownElement.java:539)
	at org.apache.tools.ant.UnknownElement.handleChildren
(UnknownElement.java:326)
	at org.apache.tools.ant.UnknownElement.configure
(UnknownElement.java:182)
	at org.apache.tools.ant.UnknownElement.maybeConfigure
(UnknownElement.java:158)
	at org.apache.tools.ant.Task.perform(Task.java:363)
	... 5 more

Thanks...



---- Original message ----
>Date: Mon, 8 Nov 2004 14:10:34 -0500
>From: Ben Edwards <ben@ben-edwards.com>  
>Subject: Custom Tasks/Types in 1.6.2  
>To: user@ant.apache.org
>
>
>I'm trying to run Ant from within Java.  I've used code 
>similar to that in org.apache.tools.ant.Main and things 
>worked fine in 1.6.0, but then break in 1.6.2.  
>
>I think it has something to do with class-loading/namespace 
>stuff, but I can't find any good documentation or anyone 
>who's encountered a similar problem.
>
>Can anyone point me to good documentation on class-loading 
>and namespace changes in 1.6.2?
>
>------------------------------------------------------------
---------
>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


Mime
View raw message