Package org.eclipse.aether.resolution
Interface ResolutionErrorPolicy
- All Known Implementing Classes:
SimpleResolutionErrorPolicy
public interface ResolutionErrorPolicy
Controls the caching of resolution errors for artifacts/metadata from remote repositories. If caching is enabled for
a given resource, a marker will be set (usually somewhere in the local repository) to suppress repeated resolution
attempts for the broken resource, thereby avoiding expensive but useless network IO. The error marker is considered
stale once the repository's update policy has expired at which point a future resolution attempt will be allowed.
Error caching considers the current network settings such that fixes to the configuration like authentication or
proxy automatically trigger revalidation with the remote side regardless of the time elapsed since the previous
resolution error.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Bit mask indicating that all resolution errors should be cached in the local repository.static final int
Bit mask indicating that resolution errors should not be cached in the local repository.static final int
Bit flag indicating whether missing artifacts/metadata should be cached in the local repository.static final int
Bit flag indicating whether connectivity/transfer errors (e.g. -
Method Summary
Modifier and TypeMethodDescriptionint
getArtifactPolicy
(RepositorySystemSession session, ResolutionErrorPolicyRequest<Artifact> request) Gets the error policy for an artifact.int
getMetadataPolicy
(RepositorySystemSession session, ResolutionErrorPolicyRequest<Metadata> request) Gets the error policy for some metadata.
-
Field Details
-
CACHE_DISABLED
Bit mask indicating that resolution errors should not be cached in the local repository. This forces the system to always query the remote repository for locally missing artifacts/metadata.- See Also:
-
CACHE_NOT_FOUND
Bit flag indicating whether missing artifacts/metadata should be cached in the local repository. If caching is enabled, resolution will not be reattempted until the update policy for the affected resource has expired.- See Also:
-
CACHE_TRANSFER_ERROR
Bit flag indicating whether connectivity/transfer errors (e.g. unreachable host, bad authentication) should be cached in the local repository. If caching is enabled, resolution will not be reattempted until the update policy for the affected resource has expired.- See Also:
-
CACHE_ALL
Bit mask indicating that all resolution errors should be cached in the local repository.- See Also:
-
-
Method Details
-
getArtifactPolicy
int getArtifactPolicy(RepositorySystemSession session, ResolutionErrorPolicyRequest<Artifact> request) Gets the error policy for an artifact.- Parameters:
session
- The repository session during which the policy is determined, must not benull
.request
- The policy request holding further details, must not benull
.- Returns:
- The bit mask describing the desired error policy.
-
getMetadataPolicy
int getMetadataPolicy(RepositorySystemSession session, ResolutionErrorPolicyRequest<Metadata> request) Gets the error policy for some metadata.- Parameters:
session
- The repository session during which the policy is determined, must not benull
.request
- The policy request holding further details, must not benull
.- Returns:
- The bit mask describing the desired error policy.
-