Well, in this specific case, since I only need the one method I'm just
going to copy the source into my plugin.

But for the general case how does one work around the problem of
dependencies loaded for other plugins getting in the way of my plugin's
dependencies?  Are you saying that Maven 1.1 bundles commons-io-1.0
(meaning the general problem is left unsolved) or that it has a better
classloader that tries to correct this issue?  Does Maven 2 do any
better?

..David..


-----Original Message-----
From: Brett Porter [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 26, 2005 10:05 AM
To: Maven Users List
Subject: Re: Custom plugin can't find its dependency

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 <[EMAIL PROTECTED]> 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: [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