Package org.apache.maven.project
Interface MavenProjectBuilder
- All Known Implementing Classes:
DefaultMavenProjectBuilder
public interface MavenProjectBuilder
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbuild
(File project, ArtifactRepository localRepository, ProfileManager globalProfileManager) build
(File project, ArtifactRepository localRepository, ProfileManager globalProfileManager, boolean checkDistributionManagementStatus) build
(File pom, ProjectBuilderConfiguration config) build
(File pom, ProjectBuilderConfiguration config, boolean checkDistributionManagementStatus) buildFromRepository
(Artifact artifact, List remoteArtifactRepositories, ArtifactRepository localRepository) Build the artifact from the local repository, resolving it if necessary.buildFromRepository
(Artifact artifact, List remoteArtifactRepositories, ArtifactRepository localRepository, boolean allowStubModel) Build the artifact from the local repository, resolving it if necessary.buildStandaloneSuperProject
(ArtifactRepository localRepository) Deprecated.buildStandaloneSuperProject
(ArtifactRepository localRepository, ProfileManager profileManager) Deprecated.buildWithDependencies
(File project, ArtifactRepository localRepository, ProfileManager globalProfileManager) buildWithDependencies
(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 Details
-
ROLE
-
STANDALONE_SUPERPOM_GROUPID
- See Also:
-
STANDALONE_SUPERPOM_ARTIFACTID
- See Also:
-
STANDALONE_SUPERPOM_VERSION
- See Also:
-
-
Method Details
-
build
MavenProject build(File project, ArtifactRepository localRepository, ProfileManager globalProfileManager) throws ProjectBuildingException - Throws:
ProjectBuildingException
-
build
MavenProject build(File project, ArtifactRepository localRepository, ProfileManager globalProfileManager, boolean checkDistributionManagementStatus) throws ProjectBuildingException - Throws:
ProjectBuildingException
-
buildWithDependencies
MavenProject buildWithDependencies(File project, ArtifactRepository localRepository, ProfileManager globalProfileManager, org.apache.maven.wagon.events.TransferListener transferListener) throws ProjectBuildingException, ArtifactResolutionException, ArtifactNotFoundException -
buildWithDependencies
MavenProject buildWithDependencies(File project, ArtifactRepository localRepository, ProfileManager globalProfileManager) throws ProjectBuildingException, ArtifactResolutionException, ArtifactNotFoundException -
buildFromRepository
MavenProject buildFromRepository(Artifact artifact, 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, 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
- Throws:
ProjectBuildingException
-
build
MavenProject build(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
-
buildStandaloneSuperProject(ProjectBuilderConfiguration)
instead.