I have a custom artfiact type web-module
; just a ZIP but with a custom extension.
I then have a project depending on it, I want its dependencies of this custom type to be unpacked. The maven-dependency-plugin unpack-dependencies goal seemed to fit the bill, however I keep getting the error:
[INFO] Unknown archiver type
Embedded error: No such archiver: 'web-module'.
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Unknown archiver type
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
...
I've done some Googling and understood that I can specifiy a custom unarchiver type in my custom plugin's components.xml. The following is now in my components.xml:
<component>
<role>org.codehaus.plexus.archiver.UnArchiver</role>
<role-hint>web-module</role-hint>
<implementation>org.codehaus.plexus.archiver.zip.ZipUnArchiver</implementation>
<instantiation-strategy>per-lookup</instantiation-strategy>
</component>
Once an install of my custom plugin was performed I tried again, still no luck! Anyone know where I'm going wrong?
I have also tried adding the custom extension plugin to the erroring module's POM with <extensions>true</extensions>
.
Try it like this: