Interface MavenInvoker<R extends MavenInvokerRequest<? extends MavenOptions>>

Type Parameters:
R - The specific type of MavenInvokerRequest this invoker can handle
All Superinterfaces:
AutoCloseable, Invoker<R>
All Known Subinterfaces:
ForkedMavenInvoker, LocalMavenInvoker, ResidentMavenInvoker
All Known Implementing Classes:
DefaultForkedMavenInvoker, DefaultLocalMavenInvoker, DefaultMavenInvoker, DefaultResidentMavenInvoker

@Experimental public interface MavenInvoker<R extends MavenInvokerRequest<? extends MavenOptions>> extends Invoker<R>
Defines the contract for a component responsible for invoking Maven using information provided in an invoker request. This interface extends the general Invoker interface, specializing it for Maven-specific operations.
Since:
4.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    invoke(R invokerRequest)
    Invokes Maven using the provided MavenInvokerRequest.

    Methods inherited from interface org.apache.maven.api.cli.Invoker

    close
  • Method Details

    • invoke

      int invoke(@Nonnull R invokerRequest) throws InvokerException
      Invokes Maven using the provided MavenInvokerRequest. This method is responsible for executing the Maven build process based on the information contained in the request.
      Specified by:
      invoke in interface Invoker<R extends MavenInvokerRequest<? extends MavenOptions>>
      Parameters:
      invokerRequest - the request containing all necessary information for the Maven invocation
      Returns:
      an integer representing the exit code of the Maven invocation (0 typically indicates success)
      Throws:
      InvokerException - if an error occurs during the Maven invocation process