public class AetherClassPathClassifier extends Object implements ClassPathClassifier
ArtifactUrlClassification based on the Maven dependencies declared by the rootArtifact using Eclipse
Aether. Uses a DependencyResolver to resolve Maven dependencies.
The classification process classifies the rootArtifact dependencies in three groups: provided, compile and
test scopes. It resolves dependencies graph for each group applying filters and exclusions and classifies the list of
URLs that would define each class loader container, plugins and application.
Dependencies resolution uses dependencies management declared by these artifacts while resolving the dependency graph.
Plugins are discovered as Extension if they do have a annotated a Class. It generates the Extension
metadata in order to later register it to an ExtensionManager.| Constructor and Description |
|---|
AetherClassPathClassifier(DependencyResolver dependencyResolver,
ArtifactClassificationTypeResolver artifactClassificationTypeResolver)
Creates an instance of the classifier.
|
| Modifier and Type | Method and Description |
|---|---|
ArtifactsUrlClassification |
classify(ClassPathClassifierContext context)
Classifies
URLs and Dependencys to define how the container, plugins and application class loaders should be
created. |
Optional<org.eclipse.aether.graph.Dependency> |
discoverDependency(String artifactCoords,
org.eclipse.aether.artifact.Artifact rootArtifact,
List<org.eclipse.aether.graph.Dependency> directDependencies)
Discovers the
Dependency from the list of directDependencies using the artifact coordiantes in format of: |
public AetherClassPathClassifier(DependencyResolver dependencyResolver, ArtifactClassificationTypeResolver artifactClassificationTypeResolver)
dependencyResolver - DependencyResolver to resolve dependencies. Non null.artifactClassificationTypeResolver - ArtifactClassificationTypeResolver to identify rootArtifact type. Non null.public ArtifactsUrlClassification classify(ClassPathClassifierContext context)
URLs and Dependencys to define how the container, plugins and application class loaders should be
created.classify in interface ClassPathClassifiercontext - ClassPathClassifierContext to be used during the classification. Non null.ArtifactsUrlClassification as result with the classificationpublic Optional<org.eclipse.aether.graph.Dependency> discoverDependency(String artifactCoords, org.eclipse.aether.artifact.Artifact rootArtifact, List<org.eclipse.aether.graph.Dependency> directDependencies)
Dependency from the list of directDependencies using the artifact coordiantes in format of:
groupId:artifactIdIf the coordinates matches to the rootArtifact it will return a "compile"
Dependency.artifactCoords - Maven coordinates that define the artifact dependencyrootArtifact - Artifact that defines the current artifact that requested to build this class loadersdirectDependencies - List of Dependency with direct dependencies for the rootArtifactDependency representing the artifact if declared as direct dependency or rootArtifact if they match it or
Optional.EMPTY if couldn't found the dependency.{@link - IllegalArgumentException} if artifactCoords are not in the expected formatCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.