@Named @Singleton public class DefaultProjectBuilder extends Object implements ProjectBuilder
Constructor and Description |
---|
DefaultProjectBuilder(ModelBuilder modelBuilder,
ModelProcessor modelProcessor,
ProjectBuildingHelper projectBuildingHelper,
MavenRepositorySystem repositorySystem,
org.eclipse.aether.RepositorySystem repoSystem,
org.eclipse.aether.impl.RemoteRepositoryManager repositoryManager,
ProjectDependenciesResolver dependencyResolver,
ModelCacheFactory modelCacheFactory) |
Modifier and Type | Method and Description |
---|---|
ProjectBuildingResult |
build(Artifact artifact,
boolean allowStubModel,
ProjectBuildingRequest request)
Builds a project descriptor for the specified artifact.
|
ProjectBuildingResult |
build(Artifact artifact,
ProjectBuildingRequest request)
Builds a project descriptor for the specified artifact.
|
ProjectBuildingResult |
build(File pomFile,
ProjectBuildingRequest request)
Builds a project descriptor from the specified POM file.
|
List<ProjectBuildingResult> |
build(List<File> pomFiles,
boolean recursive,
ProjectBuildingRequest request)
Builds the projects for the specified POM files and optionally their children.
|
ProjectBuildingResult |
build(ModelSource modelSource,
ProjectBuildingRequest request)
Builds a project descriptor for the specified model source.
|
@Inject public DefaultProjectBuilder(ModelBuilder modelBuilder, ModelProcessor modelProcessor, ProjectBuildingHelper projectBuildingHelper, MavenRepositorySystem repositorySystem, org.eclipse.aether.RepositorySystem repoSystem, org.eclipse.aether.impl.RemoteRepositoryManager repositoryManager, ProjectDependenciesResolver dependencyResolver, ModelCacheFactory modelCacheFactory)
public ProjectBuildingResult build(File pomFile, ProjectBuildingRequest request) throws ProjectBuildingException
ProjectBuilder
build
in interface ProjectBuilder
pomFile
- The POM file to build the project from, must not be null
.request
- The project building request that holds further parameters, must not be null
.null
.ProjectBuildingException
- If the project descriptor could not be successfully built.public ProjectBuildingResult build(ModelSource modelSource, ProjectBuildingRequest request) throws ProjectBuildingException
ProjectBuilder
build
in interface ProjectBuilder
modelSource
- The source of the model to build the project descriptor from, must not be null
.request
- The project building request that holds further parameters, must not be null
.null
.ProjectBuildingException
- If the project descriptor could not be successfully built.ModelSource2
public ProjectBuildingResult build(Artifact artifact, ProjectBuildingRequest request) throws ProjectBuildingException
ProjectBuilder
build
in interface ProjectBuilder
artifact
- The POM artifact to build the project from, must not be null
.request
- The project building request that holds further parameters, must not be null
.null
.ProjectBuildingException
- If the project descriptor could not be successfully built.public ProjectBuildingResult build(Artifact artifact, boolean allowStubModel, ProjectBuildingRequest request) throws ProjectBuildingException
ProjectBuilder
build
in interface ProjectBuilder
artifact
- The POM artifact to build the project from, must not be null
.allowStubModel
- A flag controlling the case of a missing POM artifact. If true
and the specified
POM artifact does not exist, a simple stub model will be returned. If false
, an exception will
be thrown.request
- The project building request that holds further parameters, must not be null
.null
.ProjectBuildingException
- If the project descriptor could not be successfully built.public List<ProjectBuildingResult> build(List<File> pomFiles, boolean recursive, ProjectBuildingRequest request) throws ProjectBuildingException
ProjectBuilder
build
in interface ProjectBuilder
pomFiles
- The POM files to build, must not be null
.recursive
- true
to recursively build submodules referenced by the POM files, false
to
build only the specified POM files.request
- The project builder configuration that provides further parameters, must not be null
.null
.ProjectBuildingException
- If an error was encountered during building of any project.
ProjectBuildingException.getResults()
provides access to the details of the problems.Copyright © 2001–2022 The Apache Software Foundation. All rights reserved.