【发布时间】:2013-03-01 20:21:09
【问题描述】:
我有一个自定义的人工制品类型web-module;只是一个 ZIP,但带有自定义扩展名。
然后我有一个依赖于它的项目,我希望解包它的这种自定义类型的依赖项。 maven-dependency-plugin unpack-dependencies 目标似乎符合要求,但我不断收到错误:
[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)
...
我已经完成了一些Googling 并了解我可以在我的自定义插件的components.xml 中指定一个自定义解压缩器类型。以下内容现在在我的 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>
安装完我的自定义插件后,我再次尝试,仍然没有成功!有谁知道我哪里出错了?
我还尝试使用 <extensions>true</extensions> 将自定义扩展插件添加到错误模块的 POM。
【问题讨论】:
标签: maven maven-2 unpack maven-dependency-plugin