Payal Bansal
Payal Bansal

Reputation: 755

Maven dependency scope test not added transitively

I have a module in which I added the dependency of cassandra-unit with scope test.

This module I am adding as a dependency in another project, but it is not adding cassandra-unit to the build path. Why? Is it something to do with scope test? Will setting optional as false help, i think by-default it is true.

Upvotes: 1

Views: 654

Answers (1)

Mark Bramnik
Mark Bramnik

Reputation: 42441

Because dependencies in the test scope are not transitive.

In general in maven there is a "claim" that the dependencies are transitive, but its not true all all the scopes that maven supports.

Check out this schema to see which rules of transitivity apply to which scopes

Upvotes: 2

Related Questions