Package org.apache.maven.project
Interface MavenProjectBuilder
-
- All Known Implementing Classes:
DefaultMavenProjectBuilder
public interface MavenProjectBuilder
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ROLE
static java.lang.String
STANDALONE_SUPERPOM_ARTIFACTID
static java.lang.String
STANDALONE_SUPERPOM_GROUPID
static java.lang.String
STANDALONE_SUPERPOM_VERSION
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description MavenProject
build(java.io.File project, ArtifactRepository localRepository, ProfileManager globalProfileManager)
MavenProject
build(java.io.File project, ArtifactRepository localRepository, ProfileManager globalProfileManager, boolean checkDistributionManagementStatus)
MavenProject
build(java.io.File pom, ProjectBuilderConfiguration config)
MavenProject
build(java.io.File pom, ProjectBuilderConfiguration config, boolean checkDistributionManagementStatus)
MavenProject
buildFromRepository(Artifact artifact, java.util.List remoteArtifactRepositories, ArtifactRepository localRepository)
Build the artifact from the local repository, resolving it if necessary.MavenProject
buildFromRepository(Artifact artifact, java.util.List remoteArtifactRepositories, ArtifactRepository localRepository, boolean allowStubModel)
Build the artifact from the local repository, resolving it if necessary.MavenProject
buildStandaloneSuperProject(ArtifactRepository localRepository)
Deprecated.MavenProject
buildStandaloneSuperProject(ArtifactRepository localRepository, ProfileManager profileManager)
Deprecated.MavenProject
buildStandaloneSuperProject(ProjectBuilderConfiguration config)
MavenProject
buildWithDependencies(java.io.File project, ArtifactRepository localRepository, ProfileManager globalProfileManager)
MavenProject
buildWithDependencies(java.io.File project, ArtifactRepository localRepository, ProfileManager globalProfileManager, org.apache.maven.wagon.events.TransferListener transferListener)
void
calculateConcreteState(MavenProject project, ProjectBuilderConfiguration config)
Variant ofcalculateConcreteState(MavenProject, ProjectBuilderConfiguration, boolean)
which assumes that project references should be processed.void
calculateConcreteState(MavenProject project, ProjectBuilderConfiguration config, boolean processReferences)
Up to this point, the build section of the POM remains uninterpolated except for the artifact coordinates it contains.
-
-
-
Field Detail
-
ROLE
static final java.lang.String ROLE
-
STANDALONE_SUPERPOM_GROUPID
static final java.lang.String STANDALONE_SUPERPOM_GROUPID
- See Also:
- Constant Field Values
-
STANDALONE_SUPERPOM_ARTIFACTID
static final java.lang.String STANDALONE_SUPERPOM_ARTIFACTID
- See Also:
- Constant Field Values
-
STANDALONE_SUPERPOM_VERSION
static final java.lang.String STANDALONE_SUPERPOM_VERSION
- See Also:
- Constant Field Values
-
-
Method Detail
-
build
MavenProject build(java.io.File project, ArtifactRepository localRepository, ProfileManager globalProfileManager) throws ProjectBuildingException
- Throws:
ProjectBuildingException
-
build
MavenProject build(java.io.File project, ArtifactRepository localRepository, ProfileManager globalProfileManager, boolean checkDistributionManagementStatus) throws ProjectBuildingException
- Throws:
ProjectBuildingException
-
buildWithDependencies
MavenProject buildWithDependencies(java.io.File project, ArtifactRepository localRepository, ProfileManager globalProfileManager, org.apache.maven.wagon.events.TransferListener transferListener) throws ProjectBuildingException, ArtifactResolutionException, ArtifactNotFoundException
-
buildWithDependencies
MavenProject buildWithDependencies(java.io.File project, ArtifactRepository localRepository, ProfileManager globalProfileManager) throws ProjectBuildingException, ArtifactResolutionException, ArtifactNotFoundException
-
buildFromRepository
MavenProject buildFromRepository(Artifact artifact, java.util.List remoteArtifactRepositories, ArtifactRepository localRepository) throws ProjectBuildingException
Build the artifact from the local repository, resolving it if necessary.- Parameters:
artifact
- the artifact descriptionlocalRepository
- the local repositoryremoteArtifactRepositories
- the remote repository list- Returns:
- the built project
- Throws:
ProjectBuildingException
-
buildFromRepository
MavenProject buildFromRepository(Artifact artifact, java.util.List remoteArtifactRepositories, ArtifactRepository localRepository, boolean allowStubModel) throws ProjectBuildingException
Build the artifact from the local repository, resolving it if necessary.- Parameters:
artifact
- the artifact descriptionlocalRepository
- the local repositoryremoteArtifactRepositories
- the remote repository listallowStubModel
- return a stub if the POM is not found- Returns:
- the built project
- Throws:
ProjectBuildingException
-
buildStandaloneSuperProject
MavenProject buildStandaloneSuperProject(ArtifactRepository localRepository) throws ProjectBuildingException
Deprecated.- Throws:
ProjectBuildingException
-
buildStandaloneSuperProject
MavenProject buildStandaloneSuperProject(ArtifactRepository localRepository, ProfileManager profileManager) throws ProjectBuildingException
Deprecated.need to pass a profilemanager with correct context (eg. with execution properties)- Throws:
ProjectBuildingException
-
buildStandaloneSuperProject
MavenProject buildStandaloneSuperProject(ProjectBuilderConfiguration config) throws ProjectBuildingException
- Throws:
ProjectBuildingException
-
build
MavenProject build(java.io.File pom, ProjectBuilderConfiguration config) throws ProjectBuildingException
- Throws:
ProjectBuildingException
-
build
MavenProject build(java.io.File pom, ProjectBuilderConfiguration config, boolean checkDistributionManagementStatus) throws ProjectBuildingException
- Throws:
ProjectBuildingException
-
calculateConcreteState
void calculateConcreteState(MavenProject project, ProjectBuilderConfiguration config) throws ModelInterpolationException
Variant ofcalculateConcreteState(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.- Throws:
ModelInterpolationException
-
calculateConcreteState
void calculateConcreteState(MavenProject project, ProjectBuilderConfiguration config, boolean processReferences) throws ModelInterpolationException
Up to this point, the build section of the POM remains uninterpolated except for the artifact coordinates it contains. This method will interpolate the build section and associated project-instance data structures. Along with theMavenProjectBuilder#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.
This method will process the following:- the specified project's parent project (if not null)
- specified project
- its execution project (if not null)
- any project references (iff processReferences == true)
- Throws:
ModelInterpolationException
-
-