Package org.apache.maven.api
Enum Class DependencyScope
- All Implemented Interfaces:
Serializable
,Comparable<DependencyScope>
,Constable
Indicates when the dependency will be used.
For example, it may be at compile time only, at runtime, or at test time.
For a given dependency, the scope is directly derived from the
Dependency.getScope()
and will be used when using PathScope
and the DependencyResolver
.- Since:
- 4.0.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionCompile, runtime and test.Compile only.None.Provided.Runtime and test.System scope.Test compile and test runtime.Test compile only.Test runtime.Undefined. -
Method Summary
Modifier and TypeMethodDescriptionstatic DependencyScope
id()
Theid
uniquely represents a value for this extensible enum.boolean
boolean
static DependencyScope
Returns the enum constant of this class with the specified name.static DependencyScope[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
None. Allows you to declare dependencies (for example to alter reactor build order) but in reality dependencies in this scope are not part of any path scope. -
UNDEFINED
Undefined. When no scope is explicitly given, UNDEFINED will be used, but its meaning will depend on whether the DependencyCoordinates is used in dependency management, in which case it means the scope is not explicitly managed by this managed dependency, or as a real dependency, in which case, the scope will default toCOMPILE
. -
COMPILE_ONLY
Compile only. -
COMPILE
Compile, runtime and test. -
RUNTIME
Runtime and test. -
PROVIDED
Provided. -
TEST_ONLY
Test compile only. -
TEST
Test compile and test runtime. -
TEST_RUNTIME
Test runtime. -
SYSTEM
System scope.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
forId
-
id
Theid
uniquely represents a value for this extensible enum. This id should be used to compute the equality and hash code for the instance.- Returns:
- the id
-
isTransitive
public boolean isTransitive() -
is
-