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, org.apache.maven.artifact.repository.ArtifactRepository localRepository, ProfileManager globalProfileManager) build
(File project, org.apache.maven.artifact.repository.ArtifactRepository localRepository, ProfileManager globalProfileManager, boolean checkDistributionManagementStatus) build
(File pom, ProjectBuilderConfiguration config) build
(File pom, ProjectBuilderConfiguration config, boolean checkDistributionManagementStatus) buildFromRepository
(org.apache.maven.artifact.Artifact artifact, List remoteArtifactRepositories, org.apache.maven.artifact.repository.ArtifactRepository localRepository) Build the artifact from the local repository, resolving it if necessary.buildFromRepository
(org.apache.maven.artifact.Artifact artifact, List remoteArtifactRepositories, org.apache.maven.artifact.repository.ArtifactRepository localRepository, boolean allowStubModel) Build the artifact from the local repository, resolving it if necessary.buildStandaloneSuperProject
(org.apache.maven.artifact.repository.ArtifactRepository localRepository) Deprecated.buildStandaloneSuperProject
(org.apache.maven.artifact.repository.ArtifactRepository localRepository, ProfileManager profileManager) Deprecated.buildWithDependencies
(File project, org.apache.maven.artifact.repository.ArtifactRepository localRepository, ProfileManager globalProfileManager) buildWithDependencies
(File project, org.apache.maven.artifact.repository.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, org.apache.maven.artifact.repository.ArtifactRepository localRepository, ProfileManager globalProfileManager) throws ProjectBuildingException - Throws:
ProjectBuildingException
-
build
MavenProject build(File project, org.apache.maven.artifact.repository.ArtifactRepository localRepository, ProfileManager globalProfileManager, boolean checkDistributionManagementStatus) throws ProjectBuildingException - Throws:
ProjectBuildingException
-
buildWithDependencies
MavenProject buildWithDependencies(File project, org.apache.maven.artifact.repository.ArtifactRepository localRepository, ProfileManager globalProfileManager, org.apache.maven.wagon.events.TransferListener transferListener) throws ProjectBuildingException, org.apache.maven.artifact.resolver.ArtifactResolutionException, org.apache.maven.artifact.resolver.ArtifactNotFoundException - Throws:
ProjectBuildingException
org.apache.maven.artifact.resolver.ArtifactResolutionException
org.apache.maven.artifact.resolver.ArtifactNotFoundException
-
buildWithDependencies
MavenProject buildWithDependencies(File project, org.apache.maven.artifact.repository.ArtifactRepository localRepository, ProfileManager globalProfileManager) throws ProjectBuildingException, org.apache.maven.artifact.resolver.ArtifactResolutionException, org.apache.maven.artifact.resolver.ArtifactNotFoundException - Throws:
ProjectBuildingException
org.apache.maven.artifact.resolver.ArtifactResolutionException
org.apache.maven.artifact.resolver.ArtifactNotFoundException
-
buildFromRepository
MavenProject buildFromRepository(org.apache.maven.artifact.Artifact artifact, List remoteArtifactRepositories, org.apache.maven.artifact.repository.ArtifactRepository localRepository) throws ProjectBuildingException Build the artifact from the local repository, resolving it if necessary.- Parameters:
artifact
- the artifact descriptionremoteArtifactRepositories
- the remote repository listlocalRepository
- the local repository- Returns:
- the built project
- Throws:
ProjectBuildingException
-
buildFromRepository
MavenProject buildFromRepository(org.apache.maven.artifact.Artifact artifact, List remoteArtifactRepositories, org.apache.maven.artifact.repository.ArtifactRepository localRepository, boolean allowStubModel) throws ProjectBuildingException Build the artifact from the local repository, resolving it if necessary.- Parameters:
artifact
- the artifact descriptionremoteArtifactRepositories
- the remote repository listlocalRepository
- the local repositoryallowStubModel
- return a stub if the POM is not found- Returns:
- the built project
- Throws:
ProjectBuildingException
-
buildStandaloneSuperProject
MavenProject buildStandaloneSuperProject(org.apache.maven.artifact.repository.ArtifactRepository localRepository) throws ProjectBuildingException Deprecated.- Throws:
ProjectBuildingException
-
buildStandaloneSuperProject
MavenProject buildStandaloneSuperProject(org.apache.maven.artifact.repository.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 theinvalid reference
MavenProjectBuilder#restoreDynamicState(MavenProject, ProjectBuilderConfiguration, boolean)
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.