Package org.eclipse.aether
Interface SystemScopeHandler
public interface SystemScopeHandler
In Resolver 1.x line, the "system" scope represented special artifacts. In 2.x resolver testing for this scope
is now delegated to consumer application. Class or component that wants to test for this special dependency scope
should use this interface, with implementation provided by consumer application.
System is a special scope that tells resolver that dependency is not to be found in any regular repository, so it should not even try to resolve the artifact from them. Dependency in this scope does not have artifact descriptor either. Artifacts in this scope should have the "local path" property set, pointing to a file on local system, where the backing file should reside. Resolution of artifacts in this scope fails, if backing file does not exist (no property set, or property contains invalid path, or the path points to a non-existent file).
- Since:
- 2.0.0
-
Field Summary
Modifier and TypeFieldDescriptionstatic final SystemScopeHandler
The equivalent of Resolver 1.x "system" scope. -
Method Summary
Modifier and TypeMethodDescriptiongetSystemPath
(Artifact artifact) Returns system path string of provided artifact, ornull
.boolean
isSystemScope
(String scope) Returnstrue
only, if passed in scope label represents "system" scope (as consumer project defines it).default boolean
isSystemScope
(Dependency dependency) Returnstrue
if given dependency is in "system" scope.default boolean
isSystemScope
(DependencyNode dependencyNode) Returnstrue
if given dependency node dependency is in "system" scope.void
setSystemPath
(Map<String, String> properties, String systemPath) Sets system path in properties.
-
Field Details
-
LEGACY
The equivalent of Resolver 1.x "system" scope.
-
-
Method Details
-
isSystemScope
Returnstrue
only, if passed in scope label represents "system" scope (as consumer project defines it). -
isSystemScope
Returnstrue
if given dependency is in "system" scope. -
isSystemScope
Returnstrue
if given dependency node dependency is in "system" scope. -
getSystemPath
Returns system path string of provided artifact, ornull
.- Parameters:
artifact
- The artifact that we want system path from, must not benull
.- Returns:
- the system path from passed in properties, or
null
if not present.
-
setSystemPath
Sets system path in properties. The passed insystemPath
can benull
, in which case expected operation is "remove" (or "unset").- Parameters:
properties
- the properties map, must not benull
.systemPath
- the system path to set (if notnull
) or unset (ifnull
).
-