You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Guru Balse <gu...@oracle.com> on 2004/09/24 23:13:42 UTC
Taskdef classpath problem
Just wondering if anyone else has run into this. In an effort to keep the build and test environments clean, we diligently blanked out the classpath and used a refid everywhere to point to the correct classpath (in <taskdef>, <java>, etc.)
The strange problem we are facing is that even though we can clearly see class X.Y.Z in the classpath (through refid and a java program that inspects jars/zips in the classpath), the task code dies with a ClassNotFound.
If we set the env classpath to the same string obtained by echoing the classpath that the taskdef sees, then everything works fine!
Looks like there may be a bug in the taskdef class loading algo?
Has anyone seen this? Any workarounds?
Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Taskdef classpath problem
Posted by Guru Balse <gu...@oracle.com>.
Hi Peter,
The problem is that the simple case works quite well, and so does the complex case (in certain situations). With many jar files in the classpath and possibly clashing classes, it seems to fail. I will try and reproduce the root problem and simplify it as much as I can.
Thanks.
Peter Reilly wrote:
>
> Can you come up with a small build file + sources that shows the problem.
>
> There are a number of issues with classpath and taskdefs, but it should be
> possible to workaround your problem.
>
> Peter
>
> Guru Balse wrote:
>
> >Just wondering if anyone else has run into this. In an effort to keep the build and test environments clean, we diligently blanked out the classpath and used a refid everywhere to point to the correct classpath (in <taskdef>, <java>, etc.)
> >
> >The strange problem we are facing is that even though we can clearly see class X.Y.Z in the classpath (through refid and a java program that inspects jars/zips in the classpath), the task code dies with a ClassNotFound.
> >
> >If we set the env classpath to the same string obtained by echoing the classpath that the taskdef sees, then everything works fine!
> >
> >Looks like there may be a bug in the taskdef class loading algo?
> >
> >Has anyone seen this? Any workarounds?
> >
> >Thanks.
> >
> >---------------------------------------------------------------------
> >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
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Taskdef classpath problem
Posted by Peter Reilly <pe...@apache.org>.
Can you come up with a small build file + sources that shows the problem.
There are a number of issues with classpath and taskdefs, but it should be
possible to workaround your problem.
Peter
Guru Balse wrote:
>Just wondering if anyone else has run into this. In an effort to keep the build and test environments clean, we diligently blanked out the classpath and used a refid everywhere to point to the correct classpath (in <taskdef>, <java>, etc.)
>
>The strange problem we are facing is that even though we can clearly see class X.Y.Z in the classpath (through refid and a java program that inspects jars/zips in the classpath), the task code dies with a ClassNotFound.
>
>If we set the env classpath to the same string obtained by echoing the classpath that the taskdef sees, then everything works fine!
>
>Looks like there may be a bug in the taskdef class loading algo?
>
>Has anyone seen this? Any workarounds?
>
>Thanks.
>
>---------------------------------------------------------------------
>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