How to copy dependencies jars (without test jars) to a directory using maven?

后端 未结 3 1716
陌清茗
陌清茗 2021-01-01 09:57

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 t

3条回答
  •  星月不相逢
    2021-01-01 10:41

    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 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).

提交回复
热议问题