Package org.apache.maven.api.services
Interface ProjectBuilderRequest
- All Superinterfaces:
RepositoryAwareRequest,Request<Session>
Request used to build a
Project using
the ProjectBuilder service.
TODO: add validationLevel, activeProfileIds, inactiveProfileIds, resolveDependencies- Since:
- 4.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classBuilder for creating ProjectBuilderRequest instances. -
Method Summary
Modifier and TypeMethodDescriptionstatic ProjectBuilderRequestCreates a new ProjectBuilderRequest with the specified session and path.static ProjectBuilderRequestCreates a new ProjectBuilderRequest with the specified session and source.builder()Creates a new builder for constructing a ProjectBuilderRequest.getPath()Gets the path to the project to build.Gets the list of remote repositories to use for resolving dependencies during project building.Gets the source of the project to build.booleanDetermines whether a stub model should be allowed when the POM is missing or unreadable.booleanDetermines whether plugins should be processed during project building.booleanDetermines whether the project builder should recursively build parent/child projects.Methods inherited from interface org.apache.maven.api.services.RepositoryAwareRequest
validate
-
Method Details
-
getPath
Gets the path to the project to build. This is typically the path to a pom.xml file or a directory containing a pom.xml file.- Returns:
- an optional containing the path to the project, or empty if not specified
-
getSource
Gets the source of the project to build. This is an alternative to specifying a path, allowing the project to be built from a model source such as a string or input stream.- Returns:
- an optional containing the source of the project, or empty if not specified
-
isAllowStubModel
boolean isAllowStubModel()Determines whether a stub model should be allowed when the POM is missing or unreadable. A stub model contains only minimal information derived from the project's coordinates.- Returns:
- true if a stub model should be allowed, false otherwise
-
isRecursive
boolean isRecursive()Determines whether the project builder should recursively build parent/child projects. When true, the builder will process parent POMs and child modules as needed.- Returns:
- true if the build should be recursive, false otherwise
-
isProcessPlugins
boolean isProcessPlugins()Determines whether plugins should be processed during project building. When true, the builder will process plugin information which may include resolving plugin dependencies and executing plugin goals that participate in project building.- Returns:
- true if plugins should be processed, false otherwise
-
getRepositories
Gets the list of remote repositories to use for resolving dependencies during project building. These repositories will be used in addition to any repositories defined in the project itself.- Specified by:
getRepositoriesin interfaceRepositoryAwareRequest- Returns:
- the list of remote repositories, or null if not specified
- See Also:
-
build
Creates a new ProjectBuilderRequest with the specified session and source.- Parameters:
session- the Maven sessionsource- the source of the project to build- Returns:
- a new ProjectBuilderRequest
- Throws:
NullPointerException- if session or source is null
-
build
Creates a new ProjectBuilderRequest with the specified session and path.- Parameters:
session- the Maven sessionpath- the path to the project to build- Returns:
- a new ProjectBuilderRequest
- Throws:
NullPointerException- if session or path is null
-
builder
Creates a new builder for constructing a ProjectBuilderRequest.- Returns:
- a new ProjectBuilderRequestBuilder
-