You should set in the classpath that you define in build.xml your new task
and all its dependencies.
Also none of these should be in the CLASSPATH environment variable before
you start ant.
If this does not help, can you post your build.xml
Antoine
----- Original Message -----
From: "Aloizio Pereira da Silva" <[EMAIL PROTECTED]>
To: "Ant Users List" <[EMAIL PROTECTED]>
Sent: Thursday, August 28, 2003 6:59 PM
Subject: Re: New Task and Classpath


>
> I made what you suggested. But, my ant task java class has a call for
> another java class that use some libraries. And I set this libraries
> in Build.xml. Then I get the following error:
>
> Why the setting classpath does not remain to the another java class?
> BUILD FAILED
> java.lang.NoClassDefFoundError:
synergia/persistencia/principal/ExcecaoPersisten
> cia  at
> org.apache.tools.ant.taskdefs.TaskGeraRelatorio.iniciarGeracao(Unknow
> n Source) at
> org.apache.tools.ant.taskdefs.TaskGeraRelatorio.execute(Unknown
> Source)
>
>             *****************************************************
>             *         Federal University of Minas Gerais        *
>             *          Department of Computer Science          *
>             *         Master Degree in Computer Science         *
>             *                                                   *
>             *                 Aloizio Silva                     *
>             *         http://www.dcc.ufmg.br/~aloizio          *
>             *                                                   *
>             *      Mobile Computer and Network Optimization     *
>             *****************************************************
>
> On 28 Aug 2003, Stefan Bodewig wrote:
>
> > On Wed, 27 Aug 2003, Aloizio Pereira da Silva <[EMAIL PROTECTED]>
> > wrote:
> >
> > > messages: [gerar_relatorio] java.lang.NoClassDefFoundError:
> > > org/apache/tools/ant/Task
> >
> > You need to add ant.jar to the <classpath> explicitly (or do that
> > inside of execute() as the <java> task that you use internally tries
> > to keep the environment clean of Ant's own classes.
> >
> > Stefan
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



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

Reply via email to