Even perlookup instantiation (that seems to be the case) will not solve my
issue as I'm using the archiver multiple time in the *same* mojo execution :


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

I need to reset the archiver, as the reset() method suggest... but don't
work as expected.

A workaround is to get the ArchiverManager and lookup a fresh JarArchiver,
but this requires a Cast.

Nico.

2008/2/11, Brett Porter <[EMAIL PROTECTED]>:
>
> I would have expected the JAR archiver to be single use (IIRC,
> perlookup instantiation-strategy instead of the default). Is it
> possible this is a regression in a recent version of the archiver?
>
> - Brett
>
> On 11/02/2008, at 10:46 PM, nicolas de loof wrote:
>
> > Hello,
> >
> > I need to build multiple archives from a mojo. I used a JarArchiver as
> > plexus component :
> >
> >    /**
> >     * @parameter expression="${
> > component.org.codehaus.plexus.archiver.Archiver#jar}"
> >     * @required
> >     */
> >    private JarArchiver archiver;
> >
> > The generated jars grows as long as I create more un the plugin :
> > the next
> > jar contains all files from the previous one
> >
> > Using archiver.reset() doesn't change anything.
> >
> > Looking at source, AbstractArchiver.addFile puts files in a filesMap
> > that is
> > never cleared.
> >
> > Is this a known bug ?
> >
> > Nico.
>
> --
> Brett Porter
> [EMAIL PROTECTED]
> http://blogs.exist.com/bporter/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to