You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Ben Gill <be...@hotmail.com> on 2005/05/03 15:33:50 UTC

Custom Ant Task with 3rd party library dependency

Hi,

My custom Ant task relies on the Spring jar files, but whatever I try, I get 
a class not found exception..

I read a lot of posts on this and saw Eric's article here:

http://www.fawcette.com/javapro/2003_02/magazine/features/ehatcher/

But I cannot believe I have to spawn off a JVM to pick up the spring jar's 
do I?

and I really dont want to force any user that uses my task to copy the jar's 
into their $ANT_HOME/lib...

Has anyone got a nice, tidy way of making 3rd party jar files available to a 
custom task?

Thanks



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Custom Ant Task with 3rd party library dependency

Posted by Stefan Bodewig <bo...@apache.org>.
On Tue, 03 May 2005, Ben Gill <be...@hotmail.com> wrote:

> Has anyone got a nice, tidy way of making 3rd party jar files
> available to a custom task?

It should work if your third party task and spring come from the same
place.

The easiest way of course is to bundle them in the same jar.

But things like starting ant with "ant -lib dir-containing-your-jars"
should work as well.

And finally it should work using nested classpath elements on taskdef
unless Ant is able to load your task from a different classloader in
the hierarchy than spring.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org