Maven Dependency Plugin选项excludeScope不适用于build-classpath命令

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

我正在尝试使用测试范围跳过依赖关系来构建类路径。我试过这个命令

mvn dependency:build-classpath -Dmdep.outputFile=path.txt -Dmdep.excludeScope=test

但我仍然在path.txt中拥有所有范围的所有jar。有人可以告诉我,如果我做错了吗?

maven maven-dependency-plugin
1个回答
1
投票

使用-DexcludeScope=test关注plugin documentation

mvn dependency:build-classpath -Dmdep.outputFile=path.txt -DexcludeScope=test

但是,根据这个Maven's issue,预计它会失败。

要包含除qazxsw poi范围之外的所有依赖项,请考虑使用qazxsw poi

© www.soinside.com 2019 - 2024. All rights reserved.