是否可以让jdeb maven插件检索所有maven依赖项并将其包含到deb文件中?

问题描述 投票:0回答:1

目前我们使用遮光罐子。试图找到一种更直接的方法。

谢谢!

maven maven-2
1个回答
0
投票

为此,您需要将依赖项下载到您选择的文件夹,例如:

<plugin>
    <artifactId>maven-dependency-plugin</artifactId>
    <executions>
        <execution>
            <phase>package</phase>
            <goals>
                <goal>copy-dependency</goal>
            </goals>
            <configuration>
                <outputDirectory>${project.build.directory}/lib</outputDirectory>
            </configuration>
        <execution>
    </executions>
</plugin>

这样,我将所有依赖项复制到

target/lib
文件夹中。稍后,您只需在
<configuration>
插件的
jdeb
标签内使用此路径,如下所示:

<plugin>
    <groupId>org.vafer</groupId>
    <artifactId>jdeb</artifactId>
    <executions>
        <execution>
            ...
            <dataSet>
                <data>
                    <type>directory</type>
                    <src>${project.build.directory}/lib</src>
                    <mapper>
                        <type>perm</type>
                        <prefix>{newpath}</prefix>
                    </mapper>
                </data>
            </dataSet>
        </execution>
    </executions>
</plugin>
© www.soinside.com 2019 - 2024. All rights reserved.