shade插件将dependency

shade插件将dependency

本文介绍了Maven shade插件将dependency-reduced-pom.xml添加到基目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

maven shade插件正在创建一个名为 dependency-reduced-pom.xml 的文件,还有 artifactname-shaded.jar 并将它们放在基本目录中。

The maven shade plugin is creating a file called dependency-reduced-pom.xml and also artifactname-shaded.jar and placing them in the base directory.

这是一个错误吗?应该在目标目录中。任何解决方法?

Is this a bug? Should be in the target directory. Any workaround?

推荐答案

您可以通过设置 createDependencyReducedPom 来避免创建它为假。

You can avoid having it created by setting createDependencyReducedPom to false.

例如

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-shade-plugin</artifactId>
    <version>${maven-shade-plugin.version}</version>
    <configuration>
        <createDependencyReducedPom>false</createDependencyReducedPom>
    </configuration>
    ....
    ....
</plugin>

参见

这篇关于Maven shade插件将dependency-reduced-pom.xml添加到基目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 05:28