I'm trying to use plexus-archiver to inject an instance of TarArchiver in a maven plugin without much success.
I declare the component
/**
*
* @component role="org.codehaus.plexus.archiver.Archiver" roleHint="tar"
*/
protected org.codehaus.plexus.archiver.tar.TarArchiver tarArchiver;
then try to use it to create a tar archive
TarCompressionMethod compressionMethod = new TarCompressionMethod();
compressionMethod.setValue("gzip");
((TarArchiver) tarArchiver).setCompression(compressionMethod);
tarArchiver.setDestFile(fileDesct);
tarArchiver.createArchive();
I tried plexus-archiver with versions 2.2, 2.4.3 but in both cases, maven (2.0.9 and 2.2.1) doesn't recognize the component.
I'll have to mention that it worked well with maven 3.0.4.
Does anyone has a clue about this behavior? What can I do to make it work under maven 2.x?