如何使用Maven将依赖项jar(无测试jar)复制到目录中? [英] How to copy dependencies jars (without test jars) to a directory using maven?
本文介绍了如何使用Maven将依赖项jar(无测试jar)复制到目录中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我看到maven-dependency-plugin
做到了;但是,似乎将所有内容(包括测试jar)复制到目标目录.有谁知道如何配置此插件以排除测试罐?
I see maven-dependency-plugin
does this; however, it seems to copy everything (including test jars) to the destination directory. Anyone know how to configure this plugin to exclude test jars?
推荐答案
尚不清楚是要排除具有test
scope 的jar还是要测试相关的jar(test
分类器).无论哪种情况,都有 dependency:copy-的两个属性依赖项可以为您提供帮助.
It is not clear if you wanted to exclude jars with test
scope or test related jars (test
classifier). In either case, there are two properties of dependency:copy-dependencies which can help you.
- excludeClassifiers 逗号分隔列表分类要排除的类别.空字符串表示不排除任何内容(默认).
- excludeScope 排除范围.空字符串表示没有作用域(默认).
- excludeClassifiers Comma Separated list of Classifiers to exclude. Empty String indicates don't exclude anything (default).
- excludeScope Scope to exclude. An Empty string indicates no scopes (default).
这篇关于如何使用Maven将依赖项jar(无测试jar)复制到目录中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文