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 String
private Map<String,
List<MavenProject>> private Map<String,
MavenProject> private org.eclipse.aether.repository.WorkspaceRepository
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
attachedArtifactComparison
(org.eclipse.aether.artifact.Artifact requested, org.eclipse.aether.artifact.Artifact attached) private File
find
(MavenProject project, org.eclipse.aether.artifact.Artifact artifact) findArtifact
(org.eclipse.aether.artifact.Artifact artifact) 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.findModel
(org.eclipse.aether.artifact.Artifact artifact) findVersions
(org.eclipse.aether.artifact.Artifact artifact) org.eclipse.aether.repository.WorkspaceRepository
private boolean
hasArtifactFileFromPackagePhase
(org.eclipse.aether.artifact.Artifact projectArtifact) private boolean
hasBeenPackaged
(MavenProject project) private static boolean
isTestArtifact
(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:
getRepository
in interfaceorg.eclipse.aether.repository.WorkspaceReader
-
findArtifact
- Specified by:
findArtifact
in interfaceorg.eclipse.aether.repository.WorkspaceReader
-
findVersions
- Specified by:
findVersions
in interfaceorg.eclipse.aether.repository.WorkspaceReader
-
findModel
- Specified by:
findModel
in 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
null
if 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:
true
if the artifact refers to test classes,false
otherwise.
-