public class DefaultMavenProjectBuilder extends org.codehaus.plexus.logging.AbstractLogEnabled implements MavenProjectBuilder, org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
| Modifier and Type | Field and Description |
|---|---|
protected ArtifactMetadataSource |
artifactMetadataSource |
protected ArtifactResolver |
artifactResolver |
static String |
MAVEN_MODEL_VERSION |
protected MavenProfilesBuilder |
profilesBuilder |
ROLE, STANDALONE_SUPERPOM_ARTIFACTID, STANDALONE_SUPERPOM_GROUPID, STANDALONE_SUPERPOM_VERSION| Constructor and Description |
|---|
DefaultMavenProjectBuilder() |
| Modifier and Type | Method and Description |
|---|---|
MavenProject |
build(File projectDescriptor,
ArtifactRepository localRepository,
ProfileManager profileManager) |
MavenProject |
build(File projectDescriptor,
ArtifactRepository localRepository,
ProfileManager profileManager,
boolean checkDistributionManagementStatus) |
MavenProject |
build(File pom,
ProjectBuilderConfiguration config) |
MavenProject |
build(File pom,
ProjectBuilderConfiguration config,
boolean checkDistributionManagementStatus) |
MavenProject |
buildFromRepository(Artifact artifact,
List remoteArtifactRepositories,
ArtifactRepository localRepository)
Build the artifact from the local repository, resolving it if necessary.
|
MavenProject |
buildFromRepository(Artifact artifact,
List remoteArtifactRepositories,
ArtifactRepository localRepository,
boolean allowStubModel)
Build the artifact from the local repository, resolving it if necessary.
|
MavenProject |
buildStandaloneSuperProject(ArtifactRepository localRepository) |
MavenProject |
buildStandaloneSuperProject(ArtifactRepository localRepository,
ProfileManager profileManager)
need to pass a profilemanager with correct context (eg.
|
MavenProject |
buildStandaloneSuperProject(ProjectBuilderConfiguration config) |
MavenProject |
buildWithDependencies(File projectDescriptor,
ArtifactRepository localRepository,
ProfileManager profileManager) |
MavenProject |
buildWithDependencies(File projectDescriptor,
ArtifactRepository localRepository,
ProfileManager profileManager,
org.apache.maven.wagon.events.TransferListener transferListener) |
void |
calculateConcreteState(MavenProject project,
ProjectBuilderConfiguration config)
Variant of
MavenProjectBuilder.calculateConcreteState(MavenProject, ProjectBuilderConfiguration, boolean)
which assumes that project references should be processed. |
void |
calculateConcreteState(MavenProject project,
ProjectBuilderConfiguration config,
boolean processProjectReferences)
Up to this point, the build section of the POM remains uninterpolated except for the artifact coordinates
it contains.
|
void |
contextualize(org.codehaus.plexus.context.Context context) |
protected Set |
createExtensionArtifacts(String projectId,
List extensions) |
protected Set |
createPluginArtifacts(String projectId,
List plugins) |
protected Set |
createReportArtifacts(String projectId,
List reports) |
void |
initialize() |
void |
restoreDynamicState(MavenProject project,
ProjectBuilderConfiguration config) |
void |
restoreDynamicState(MavenProject project,
ProjectBuilderConfiguration config,
boolean processProjectReferences) |
protected MavenProfilesBuilder profilesBuilder
protected ArtifactResolver artifactResolver
protected ArtifactMetadataSource artifactMetadataSource
public static final String MAVEN_MODEL_VERSION
public void initialize()
initialize in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializablepublic MavenProject build(File pom, ProjectBuilderConfiguration config) throws ProjectBuildingException
build in interface MavenProjectBuilderProjectBuildingExceptionpublic MavenProject build(File pom, ProjectBuilderConfiguration config, boolean checkDistributionManagementStatus) throws ProjectBuildingException
build in interface MavenProjectBuilderProjectBuildingExceptionpublic MavenProject build(File projectDescriptor, ArtifactRepository localRepository, ProfileManager profileManager) throws ProjectBuildingException
build in interface MavenProjectBuilderProjectBuildingExceptionpublic MavenProject build(File projectDescriptor, ArtifactRepository localRepository, ProfileManager profileManager, boolean checkDistributionManagementStatus) throws ProjectBuildingException
build in interface MavenProjectBuilderProjectBuildingExceptionpublic MavenProject buildFromRepository(Artifact artifact, List remoteArtifactRepositories, ArtifactRepository localRepository, boolean allowStubModel) throws ProjectBuildingException
MavenProjectBuilderbuildFromRepository in interface MavenProjectBuilderartifact - the artifact descriptionremoteArtifactRepositories - the remote repository listlocalRepository - the local repositoryallowStubModel - return a stub if the POM is not foundProjectBuildingExceptionpublic MavenProject buildFromRepository(Artifact artifact, List remoteArtifactRepositories, ArtifactRepository localRepository) throws ProjectBuildingException
MavenProjectBuilderbuildFromRepository in interface MavenProjectBuilderartifact - the artifact descriptionremoteArtifactRepositories - the remote repository listlocalRepository - the local repositoryProjectBuildingExceptionpublic MavenProject buildStandaloneSuperProject(ArtifactRepository localRepository) throws ProjectBuildingException
buildStandaloneSuperProject in interface MavenProjectBuilderProjectBuildingExceptionpublic MavenProject buildStandaloneSuperProject(ArtifactRepository localRepository, ProfileManager profileManager) throws ProjectBuildingException
MavenProjectBuilderbuildStandaloneSuperProject in interface MavenProjectBuilderProjectBuildingExceptionpublic MavenProject buildStandaloneSuperProject(ProjectBuilderConfiguration config) throws ProjectBuildingException
buildStandaloneSuperProject in interface MavenProjectBuilderProjectBuildingExceptionpublic MavenProject buildWithDependencies(File projectDescriptor, ArtifactRepository localRepository, ProfileManager profileManager) throws ProjectBuildingException, ArtifactResolutionException, ArtifactNotFoundException
buildWithDependencies in interface MavenProjectBuilderProjectBuildingExceptionArtifactResolutionExceptionArtifactNotFoundExceptionpublic MavenProject buildWithDependencies(File projectDescriptor, ArtifactRepository localRepository, ProfileManager profileManager, org.apache.maven.wagon.events.TransferListener transferListener) throws ProjectBuildingException, ArtifactResolutionException, ArtifactNotFoundException
buildWithDependencies in interface MavenProjectBuilderProjectBuildingExceptionArtifactResolutionExceptionArtifactNotFoundExceptionprotected Set createPluginArtifacts(String projectId, List plugins) throws ProjectBuildingException
ProjectBuildingExceptionprotected Set createReportArtifacts(String projectId, List reports) throws ProjectBuildingException
ProjectBuildingExceptionprotected Set createExtensionArtifacts(String projectId, List extensions) throws ProjectBuildingException
ProjectBuildingExceptionpublic void contextualize(org.codehaus.plexus.context.Context context)
throws org.codehaus.plexus.context.ContextException
contextualize in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizableorg.codehaus.plexus.context.ContextExceptionpublic void calculateConcreteState(MavenProject project, ProjectBuilderConfiguration config) throws ModelInterpolationException
MavenProjectBuilder.calculateConcreteState(MavenProject, ProjectBuilderConfiguration, boolean)
which assumes that project references should be processed. This is provided for performance reasons, for cases
where you know all projects in the reactor will be processed, making traversal of project references unnecessary.calculateConcreteState in interface MavenProjectBuilderModelInterpolationExceptionpublic void calculateConcreteState(MavenProject project, ProjectBuilderConfiguration config, boolean processProjectReferences) throws ModelInterpolationException
MavenProjectBuilder#restoreDynamicState(MavenProject, ProjectBuilderConfiguration, boolean)
method, this method allows expressions in these areas of the POM and project instance to
be reevaluated in the event that a mojo changes one the build-path values, or a project property.
calculateConcreteState in interface MavenProjectBuilderModelInterpolationExceptionpublic void restoreDynamicState(MavenProject project, ProjectBuilderConfiguration config) throws ModelInterpolationException
ModelInterpolationExceptionpublic void restoreDynamicState(MavenProject project, ProjectBuilderConfiguration config, boolean processProjectReferences) throws ModelInterpolationException
ModelInterpolationExceptionCopyright © 2001-2021 The Apache Software Foundation. All Rights Reserved.