You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Moran Ben-David <mo...@place-base.com> on 2005/08/03 17:56:34 UTC
Adding to ant's classpath from an ant build script
I have a custom Ant task in a jar file (custom.jar) that I would like to use
in my ant build.xml.
However, I would like to add this jar to the ant runtime only during the
execution of my script. Is there a way I can tell ant to include this jar
(/home/me/custom.jar) in its classpath from my build.xml?
I don't want to copy the file to the ant/lib directory. Instead, I just
want to expose it for my script alone.
Thanks in advance,
Moran Ben-David
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
RE: Adding to ant's classpath from an ant build script
Posted by Moran Ben-David <mo...@place-base.com>.
Thank you, Antoine. I used the following worked like a charm.
Moran
> -----Original Message-----
> From: Antoine Levy-Lambert [mailto:antoine@gmx.de]
> Sent: Wednesday, August 03, 2005 12:17 PM
> To: Ant Users List
> Subject: Re: Adding to ant's classpath from an ant build script
>
> Hello Moran,
>
> if your use case does not bring you in the delegating class loader case,
> you can use the classpath attribute of the <taskdef/> task (actually
> documented under typedef, because taskdef is an extension of <typedef/>).
>
> Cheers,
>
> Antoine
>
> > --- Ursprüngliche Nachricht ---
> > Von: "Moran Ben-David" <mo...@place-base.com>
> > An: "'Ant Users List'" <us...@ant.apache.org>
> > Betreff: Adding to ant's classpath from an ant build script
> > Datum: Wed, 3 Aug 2005 11:56:34 -0400
> >
> > I have a custom Ant task in a jar file (custom.jar) that I would like to
> > use
> > in my ant build.xml.
> >
> > However, I would like to add this jar to the ant runtime only during the
> > execution of my script. Is there a way I can tell ant to include this
> jar
> > (/home/me/custom.jar) in its classpath from my build.xml?
> >
> > I don't want to copy the file to the ant/lib directory. Instead, I just
> > want to expose it for my script alone.
> >
> > Thanks in advance,
> > Moran Ben-David
> >
> >
> > ---------------------------------------------------------------------
> > 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: Adding to ant's classpath from an ant build script
Posted by Antoine Levy-Lambert <an...@gmx.de>.
Hello Moran,
if your use case does not bring you in the delegating class loader case,
you can use the classpath attribute of the <taskdef/> task (actually
documented under typedef, because taskdef is an extension of <typedef/>).
Cheers,
Antoine
> --- Ursprüngliche Nachricht ---
> Von: "Moran Ben-David" <mo...@place-base.com>
> An: "'Ant Users List'" <us...@ant.apache.org>
> Betreff: Adding to ant's classpath from an ant build script
> Datum: Wed, 3 Aug 2005 11:56:34 -0400
>
> I have a custom Ant task in a jar file (custom.jar) that I would like to
> use
> in my ant build.xml.
>
> However, I would like to add this jar to the ant runtime only during the
> execution of my script. Is there a way I can tell ant to include this jar
> (/home/me/custom.jar) in its classpath from my build.xml?
>
> I don't want to copy the file to the ant/lib directory. Instead, I just
> want to expose it for my script alone.
>
> Thanks in advance,
> Moran Ben-David
>
>
> ---------------------------------------------------------------------
> 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