Class ProjectBuilderRequest.ProjectBuilderRequestBuilder

java.lang.Object
org.apache.maven.api.services.ProjectBuilderRequest.ProjectBuilderRequestBuilder
Enclosing interface:
ProjectBuilderRequest

@NotThreadSafe public static class ProjectBuilderRequest.ProjectBuilderRequestBuilder extends Object
Builder for creating ProjectBuilderRequest instances. This builder provides a fluent API for setting the various properties of a request.
Since:
4.0.0
  • Method Details

    • session

      Sets the Maven session for this request.
      Parameters:
      session - the Maven session
      Returns:
      this builder instance
    • trace

      Sets the request trace for this request. The trace is used for debugging and monitoring purposes.
      Parameters:
      trace - the request trace
      Returns:
      this builder instance
    • path

      Sets 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.
      Parameters:
      path - the path to the project
      Returns:
      this builder instance
    • source

      Sets 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.
      Parameters:
      source - the source of the project
      Returns:
      this builder instance
    • processPlugins

      public ProjectBuilderRequest.ProjectBuilderRequestBuilder processPlugins(boolean processPlugins)
      Sets 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.
      Parameters:
      processPlugins - true if plugins should be processed, false otherwise
      Returns:
      this builder instance
    • repositories

      Sets 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.
      Parameters:
      repositories - the list of remote repositories
      Returns:
      this builder instance
    • build

      public ProjectBuilderRequest build()
      Builds a new ProjectBuilderRequest with the current builder settings.
      Returns:
      a new ProjectBuilderRequest instance