Mark Arnold wrote:
> When I try to execute my task, ant is giving me a ClassNotFoundException saying that 
>com.mine.myOwnSpecialTask does not exist.
> The jar file is fine however.
> 
> Copying mySpecial.jar into %ANT_HOME%/lib did not help either. After some hours I 
>finally found that copying all the 3 jar files
> (optional.jar was already there anyway, but junit.jar was not there yet) into 
>%ANT_HOME%/lib as well finally made it work.
> 
> So 2 questions:
> 1. Why do I have to copy the jars into %ANT_HOME%/lib if I already specify them in 
>the classpath tag for the taskdef?

Does your task have any other external dependencies besides those three 
JAR files?  If so, you need to specify those in the <classpath> as well.

> 2. Why does ant tell me it can not find myOwnSpecialTask in mySpecial.jar if the 
>problem is really the junit.jar and some of the
> classes in there which I inherit myOwnSpecialTask from?

If it can't load your task (possibly because of a missing dependency) 
then you can see this error.

> Is this problem a bug in ant or is the classpath tag within the taskdef not meant to 
>be used for what I think it is?

Its just the nature of the classloader beast, I believe.

        Erik



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to