Package org.apache.maven
Class ReactorReader
java.lang.Object
org.apache.maven.ReactorReader
- All Implemented Interfaces:
MavenWorkspaceReader,org.eclipse.aether.repository.WorkspaceReader
An implementation of a workspace reader that knows how to search the Maven reactor for artifacts, either as packaged
jar if it has been built, or only compile output directory if packaging hasn't happened yet.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Collection<String>static final Stringprivate Map<String,List<MavenProject>> private Map<String,MavenProject> private org.eclipse.aether.repository.WorkspaceRepository -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate booleanattachedArtifactComparison(org.eclipse.aether.artifact.Artifact requested, org.eclipse.aether.artifact.Artifact attached) private Filefind(MavenProject project, org.eclipse.aether.artifact.Artifact artifact) findArtifact(org.eclipse.aether.artifact.Artifact artifact) private org.eclipse.aether.artifact.ArtifactfindMatchingArtifact(MavenProject project, org.eclipse.aether.artifact.Artifact requestedArtifact) Tries to resolve the specified artifact from the artifacts of the given project.findModel(org.eclipse.aether.artifact.Artifact artifact) findVersions(org.eclipse.aether.artifact.Artifact artifact) org.eclipse.aether.repository.WorkspaceRepositoryprivate booleanhasArtifactFileFromPackagePhase(org.eclipse.aether.artifact.Artifact projectArtifact) private booleanhasBeenPackaged(MavenProject project) private static booleanisTestArtifact(org.eclipse.aether.artifact.Artifact artifact) Determines whether the specified artifact refers to test classes.
-
Field Details
-
HINT
- See Also:
-
COMPILE_PHASE_TYPES
-
projectsByGAV
-
projectsByGA
-
repository
private org.eclipse.aether.repository.WorkspaceRepository repository
-
-
Constructor Details
-
ReactorReader
-
-
Method Details
-
getRepository
public org.eclipse.aether.repository.WorkspaceRepository getRepository()- Specified by:
getRepositoryin interfaceorg.eclipse.aether.repository.WorkspaceReader
-
findArtifact
- Specified by:
findArtifactin interfaceorg.eclipse.aether.repository.WorkspaceReader
-
findVersions
- Specified by:
findVersionsin interfaceorg.eclipse.aether.repository.WorkspaceReader
-
findModel
- Specified by:
findModelin interfaceMavenWorkspaceReader
-
find
-
hasArtifactFileFromPackagePhase
private boolean hasArtifactFileFromPackagePhase(org.eclipse.aether.artifact.Artifact projectArtifact) -
hasBeenPackaged
-
findMatchingArtifact
private org.eclipse.aether.artifact.Artifact findMatchingArtifact(MavenProject project, org.eclipse.aether.artifact.Artifact requestedArtifact) Tries to resolve the specified artifact from the artifacts of the given project.- Parameters:
project- The project to try to resolve the artifact from, must not benull.requestedArtifact- The artifact to resolve, must not benull.- Returns:
- The matching artifact from the project or
nullif not found. Note that this
-
attachedArtifactComparison
private boolean attachedArtifactComparison(org.eclipse.aether.artifact.Artifact requested, org.eclipse.aether.artifact.Artifact attached) -
isTestArtifact
private static boolean isTestArtifact(org.eclipse.aether.artifact.Artifact artifact) Determines whether the specified artifact refers to test classes.- Parameters:
artifact- The artifact to check, must not benull.- Returns:
trueif the artifact refers to test classes,falseotherwise.
-