Maven 1 has long had issues with classloader separation between the
plugins and Maven itself. I think I had a working version once that
did separate them, but so many plugins depended on other plugins
dependencies without stating it, it was far too big a change to
introduce :)

Maven 2 properly isolates plugins from each other. They still inherit
/lib, but we are working to isolate that to the Maven API libraries
and Plexus only. Currently, only jline and jsch are passed on
unnecessarily.

- Brett

On 7/27/05, David Jackman <[EMAIL PROTECTED]> wrote:
> 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