dependency scope

A Maven setting on a dependency that says when it is on the class path, such as only while compiling and running tests.

In more detail

A dependency in the test scope, such as JUnit, is available while tests compile and run and is left out of the packaged artifact. The default scope, compile, is available everywhere and ships with the application. Gradle expresses the same idea with configurations such as testImplementation.

Example

<scope>test</scope>

Related terms

Taught in

References