Jeff
Jeff

Reputation: 139

Maven Dependency Plugin option excludeScope doesn't work for build-classpath command

I'm trying to build classpath with skipping dependencies with test scope. I tried this command

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

But I still have all jars for all scopes in path.txt. Can somebody tell me if I do something wrong?

Upvotes: 0

Views: 346

Answers (1)

Shmulik Klein
Shmulik Klein

Reputation: 3914

Use -DexcludeScope=test to follow the plugin documentation:

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

but expect it to fail, according to this Maven's issue.

To include all dependences besides ones with test scope, consider using -DincludeScope=compile

Upvotes: 1

Related Questions