Not sure to understand what you would like me to see in the dependency
plugin.

I get my unarchiver using plexus dependency mecanism :

    /**
     * @parameter expression="${
component.org.codehaus.plexus.archiver.UnArchiver#jsar}"
     * @required
     */
    private UnArchiver archiver;

With my other plugin defining a component in META-INF/plexus.xml :

    <component>
      <role>org.codehaus.plexus.archiver.UnArchiver</role>
      <role-hint>jsar</role-hint>
      <implementation>org.codehaus.plexus.archiver.zip.ZipUnArchiver
</implementation>
    </component>


This worked as expected when the unarchiver was defined in the plugin that
uses the archiver, but not if the unarchiver is defined bu another plugin. I
supose those plugins have separate classloaders.

Any workaround ?


2007/10/17, Brian E. Fox <[EMAIL PROTECTED]>:
>
> Take a look at the dependency plugin for use of the unarchiver.
>
> -----Original Message-----
> From: nicolas de loof [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, October 17, 2007 10:33 AM
> To: Maven Developers List
> Subject: plexus classloader issue ?
>
> Hello,
>
> I've created a plugin that requires a plexus UnArchiver as @component.
> The expected Unarchiver is declared by another plugin, configured as an
> extensions.
>
> All works fine when unit-testing the plugin using maven-test-harness,
> but
> when I try to use it from another project (it test) I get this error :
>
> Can not set org.codehaus.plexus.archiver.UnArchiver field
> org.codehaus.mojo.javascript.AbstractCopyDependenciesMojo.archiver to
> org.codehaus.plexus.archiver.zip.ZipUnArchiver
>
> ZipUnArchiver implements UnArchiver ! So this seems to be a classloader
> issue. Do you have any idea what can be wrong in my config, or any way
> to
> investigate ?
>
> Nico.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to