首页 > 解决方案 > 使用 Maven 程序集插件复制选定的依赖项及其传递依赖项

问题描述

我想使用 Maven 程序集插件复制选定的依赖项(使用包含过滤器)及其传递依赖项。例如(来自程序集描述符的片段):

<dependencySets>
    <dependencySet>
            <useTransitiveDependencies>true</useTransitiveDependencies>
            <unpack>false</unpack>
            <includes>
                <include>gpid:artifcatid</include>

            </includes>
        </dependencySet>
    </dependencySets>

这只是将一个 jar 复制到目标目录。我希望它也能复制所有的传递依赖。如何实现?我希望我们不应该单独列出所有的罐子。

标签: mavenmaven-assembly-plugin

解决方案


推荐阅读