Interface ProjectBuilderRequest

All Superinterfaces:
Request<Session>

@Experimental @Immutable public interface ProjectBuilderRequest extends Request<Session>
Request used to build a Project using the ProjectBuilder service. TODO: add validationLevel, activeProfileIds, inactiveProfileIds, resolveDependencies
Since:
4.0.0
  • Method Details

    • getPath

      @Nonnull Optional<Path> 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

      @Nonnull Optional<Source> 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

      @Nullable List<RemoteRepository> 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.
      Returns:
      the list of remote repositories, or null if not specified
    • build

      @Nonnull static ProjectBuilderRequest build(@Nonnull Session session, @Nonnull Source source)
      Creates a new ProjectBuilderRequest with the specified session and source.
      Parameters:
      session - the Maven session
      source - 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 session
      path - 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