Maven程序集与ModuleSet:如何在另一个文件夹中复制依赖项?

问题描述

我正在使用Maven Assembly构建一个多模块项目。

该项目由8个模块组成。它们有一个公共的父pom,并且有第9个模块定义了程序集。程序集如下:

<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd">
    <id>bin</id>
    <formats>
        <format>dir</format>
    </formats>
    <includeBaseDirectory>false</includeBaseDirectory>
    <moduleSets>
        <moduleSet>
            <useAllReactorProjects>true</useAllReactorProjects>
            <includes>
                <include>*:jar</include>
            </includes>
            <binaries>
                <outputDirectory>jars</outputDirectory>
                <unpack>false</unpack>
            </binaries>
        </moduleSet>
    </moduleSets>

</assembly>

一切正常:当我运行mvn clean package时,组装模块会在jars文件夹中接收9个罐子。

我的问题与这9个jar的依赖关系有关。他们带来了20罐依赖。因为我希望有一个不错的文件夹组织,所以我希望将这20个jar保存在另一个文件夹中,例如 jars/lib

我查看了汇编文档,但找不到使用多模块项目的方法。 你会怎么做? 谢谢!

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)