@Component(role=ProjectBuildingHelper.class) public class DefaultProjectBuildingHelper extends java.lang.Object implements ProjectBuildingHelper
Modifier and Type | Field and Description |
---|---|
private ClassRealmManager |
classRealmManager |
private org.codehaus.plexus.PlexusContainer |
container |
private org.codehaus.plexus.logging.Logger |
logger |
private MavenPluginManager |
pluginManager |
private ProjectRealmCache |
projectRealmCache |
private RepositorySystem |
repositorySystem |
Constructor and Description |
---|
DefaultProjectBuildingHelper() |
Modifier and Type | Method and Description |
---|---|
java.util.List<ArtifactRepository> |
createArtifactRepositories(java.util.List<Repository> pomRepositories,
java.util.List<ArtifactRepository> externalRepositories,
ProjectBuildingRequest request)
Creates the effective artifact repositories from the specified POM repositories.
|
ProjectRealmCache.CacheRecord |
createProjectRealm(MavenProject project,
Model model,
ProjectBuildingRequest request)
Creates the project realm that hosts the build extensions of the specified model.
|
void |
selectProjectRealm(MavenProject project)
Updates the context class loader such that the container will search the project realm when the model builder
injects the lifecycle bindings from the packaging in the next step.
|
private java.util.List<org.eclipse.aether.artifact.Artifact> |
toAetherArtifacts(java.util.List<Artifact> pluginArtifacts) |
@Requirement private org.codehaus.plexus.logging.Logger logger
@Requirement private org.codehaus.plexus.PlexusContainer container
@Requirement private ClassRealmManager classRealmManager
@Requirement private ProjectRealmCache projectRealmCache
@Requirement private RepositorySystem repositorySystem
@Requirement private MavenPluginManager pluginManager
public java.util.List<ArtifactRepository> createArtifactRepositories(java.util.List<Repository> pomRepositories, java.util.List<ArtifactRepository> externalRepositories, ProjectBuildingRequest request) throws InvalidRepositoryException
ProjectBuildingHelper
createArtifactRepositories
in interface ProjectBuildingHelper
pomRepositories
- The POM repositories to create the artifact repositories from, must not be null
.externalRepositories
- The external (and already mirrored) repositories to merge into the result list, may
be null
.request
- The project building request holding further settings like repository settings, must not be
null
.null
.InvalidRepositoryException
public ProjectRealmCache.CacheRecord createProjectRealm(MavenProject project, Model model, ProjectBuildingRequest request) throws PluginResolutionException, PluginVersionResolutionException, PluginManagerException
ProjectBuildingHelper
createProjectRealm
in interface ProjectBuildingHelper
project
- The project to create the project realm for, must not be null
model
- The model to create the project realm for, must not be null
request
- The project building request holding further settings like repository settings, must not be
null
.null
.PluginResolutionException
- If any build extension could not be resolved.PluginVersionResolutionException
PluginManagerException
public void selectProjectRealm(MavenProject project)
ProjectBuildingHelper
selectProjectRealm
in interface ProjectBuildingHelper
project
- The project whose class realm should be selected, must not be null
.private java.util.List<org.eclipse.aether.artifact.Artifact> toAetherArtifacts(java.util.List<Artifact> pluginArtifacts)