Package org.eclipse.aether.spi.validator
Interface Validator
public interface Validator
A repository system main input validator; this validator is used in repository system "main entry methods".
- Since:
- 2.0.8
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidvalidateArtifact(Artifact artifact) Validates artifact.default voidvalidateDependency(Dependency dependency) Validates dependency.default voidvalidateLocalRepository(LocalRepository localRepository) Validates local repository.default voidvalidateManagedDependency(Dependency managedDependency) Validates managed dependency.default voidvalidateMetadata(Metadata metadata) Validates metadata.default voidvalidateRemoteRepository(RemoteRepository remoteRepository) Validates remote repository.
-
Method Details
-
validateArtifact
Validates artifact.- Parameters:
artifact- the artifact to validate, nevernull.- Throws:
IllegalArgumentException- if artifact is invalid.
-
validateMetadata
Validates metadata.- Parameters:
metadata- the metadata to validate, nevernull.- Throws:
IllegalArgumentException- if metadata is invalid.
-
validateDependency
Validates dependency.- Parameters:
dependency- the dependency to validate, nevernull.- Throws:
IllegalArgumentException- if dependency is invalid.
-
validateManagedDependency
default void validateManagedDependency(Dependency managedDependency) throws IllegalArgumentException Validates managed dependency. Important: They are declarative constraints (version/scope/exclusion overrides) that only take effect when a matching dependency is encountered during collection. Validating them eagerly may reject valid builds where a BOM imports managed dependencies with uninterpolated property expressions (e.g.${osgi.version}) that are never actually used. If a managed dependency IS matched and its coordinates are invalid, the error will surface naturally during version resolution or artifact resolution.- Parameters:
managedDependency- the managed dependency to validate, nevernull.- Throws:
IllegalArgumentException- if dependency is invalid.- Since:
- 2.0.22
-
validateLocalRepository
default void validateLocalRepository(LocalRepository localRepository) throws IllegalArgumentException Validates local repository.- Parameters:
localRepository- the local repository to validate, nevernull.- Throws:
IllegalArgumentException- if local repository is invalid.
-
validateRemoteRepository
default void validateRemoteRepository(RemoteRepository remoteRepository) throws IllegalArgumentException Validates remote repository.- Parameters:
remoteRepository- the remote repository to validate, nevernull.- Throws:
IllegalArgumentException- if remote repository is invalid.
-