Package org.apache.maven.internal.aether
Class ReverseTreeRepositoryListener
- java.lang.Object
-
- org.eclipse.aether.AbstractRepositoryListener
-
- org.apache.maven.internal.aether.ReverseTreeRepositoryListener
-
- All Implemented Interfaces:
org.eclipse.aether.RepositoryListener
class ReverseTreeRepositoryListener extends org.eclipse.aether.AbstractRepositoryListener
A class building reverse tree usingCollectStepData
trace data provided inRepositoryEvent
events fired during collection.- Since:
- 3.9.0
-
-
Constructor Summary
Constructors Constructor Description ReverseTreeRepositoryListener()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
artifactResolved(org.eclipse.aether.RepositoryEvent event)
(package private) static boolean
isInScope(org.eclipse.aether.artifact.Artifact artifact, org.eclipse.aether.artifact.Artifact nodeArtifact)
The event "artifact resolved" if fired WHENEVER an artifact is resolved, BUT it happens also when an artifact descriptor (model, the POM) is being built, and parent (and parent of parent...) is being asked for.(package private) static boolean
isLocalRepositoryArtifactOrMissing(org.eclipse.aether.RepositorySystemSession session, org.eclipse.aether.artifact.Artifact artifact)
Returnstrue
if passed in artifact is originating from local repository.(package private) static org.eclipse.aether.collection.CollectStepData
lookupCollectStepData(org.eclipse.aether.RequestTrace trace)
Unravels trace tree (going upwards from current node), looking forCollectStepData
trace data.-
Methods inherited from class org.eclipse.aether.AbstractRepositoryListener
artifactDeployed, artifactDeploying, artifactDescriptorInvalid, artifactDescriptorMissing, artifactDownloaded, artifactDownloading, artifactInstalled, artifactInstalling, artifactResolving, metadataDeployed, metadataDeploying, metadataDownloaded, metadataDownloading, metadataInstalled, metadataInstalling, metadataInvalid, metadataResolved, metadataResolving
-
-
-
-
Method Detail
-
artifactResolved
public void artifactResolved(org.eclipse.aether.RepositoryEvent event)
- Specified by:
artifactResolved
in interfaceorg.eclipse.aether.RepositoryListener
- Overrides:
artifactResolved
in classorg.eclipse.aether.AbstractRepositoryListener
-
isLocalRepositoryArtifactOrMissing
static boolean isLocalRepositoryArtifactOrMissing(org.eclipse.aether.RepositorySystemSession session, org.eclipse.aether.artifact.Artifact artifact)
Returnstrue
if passed in artifact is originating from local repository. In other words, we want to process and store tracking information ONLY into local repository, not to any other place. This method filters out currently built artifacts, as events are fired for them as well, but their resolved artifact file would point to checked out source-tree, not the local repository.Visible for testing.
-
lookupCollectStepData
static org.eclipse.aether.collection.CollectStepData lookupCollectStepData(org.eclipse.aether.RequestTrace trace)
Unravels trace tree (going upwards from current node), looking forCollectStepData
trace data. This method may returnnull
if no collect step data found in passed trace data or it's parents.Visible for testing.
-
isInScope
static boolean isInScope(org.eclipse.aether.artifact.Artifact artifact, org.eclipse.aether.artifact.Artifact nodeArtifact)
The event "artifact resolved" if fired WHENEVER an artifact is resolved, BUT it happens also when an artifact descriptor (model, the POM) is being built, and parent (and parent of parent...) is being asked for. Hence, this method "filters" out in WHICH artifact are we interested in, but it intentionally neglects extension as ArtifactDescriptorReader modifies extension to "pom" during collect. So all we have to rely on is GAV only.
-
-