You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by David Jackman <Da...@fastsearch.com> on 2005/07/26 17:58:27 UTC

Custom plugin can't find its dependency

I've written a custom plugin that uses a static method in
commons-io-1.0.jar.  That seems simple enough; I just list that as a
dependency in its pom.
 
However, when attempting to run the plugin, I get an error back stating
that there is no such method.
 
Looking at the debug output it seems that this happens because before
getting to my plugin it adds the dependencies for the artifact plugin to
the classloader, which includes commons-io-20030203.000550.jar.  It
eventually gets to my plugin and says it's adding commons-io.1.0.jar to
the classloader.
 
As you might have guessed, the particular method I'm calling is in
version 1.0, but not in the version of the commons-io that was added to
the classloader first (the owning class is there--just not the method).
 
Is there any way to solve this problem?
 
..David..
 

Re: Custom plugin can't find its dependency

Posted by Brett Porter <br...@gmail.com>.
Unfortunately, only to hack your own classloader that includes
commons-io 1.0, or upgrade to Maven 1.1 that bundles it.

- Brett

On 7/27/05, David Jackman <Da...@fastsearch.com> wrote:
> I've written a custom plugin that uses a static method in
> commons-io-1.0.jar.  That seems simple enough; I just list that as a
> dependency in its pom.
> 
> However, when attempting to run the plugin, I get an error back stating
> that there is no such method.
> 
> Looking at the debug output it seems that this happens because before
> getting to my plugin it adds the dependencies for the artifact plugin to
> the classloader, which includes commons-io-20030203.000550.jar.  It
> eventually gets to my plugin and says it's adding commons-io.1.0.jar to
> the classloader.
> 
> As you might have guessed, the particular method I'm calling is in
> version 1.0, but not in the version of the commons-io that was added to
> the classloader first (the owning class is there--just not the method).
> 
> Is there any way to solve this problem?
> 
> ..David..
> 
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org