Class ForkedMavenInvoker

java.lang.Object
org.apache.maven.cling.invoker.mvn.forked.ForkedMavenInvoker
All Implemented Interfaces:
AutoCloseable, Invoker

public class ForkedMavenInvoker extends Object implements Invoker
Forked invoker implementation, that spawns a subprocess with Maven from the installation directory.
  • Constructor Details

    • ForkedMavenInvoker

      public ForkedMavenInvoker()
  • Method Details

    • invoke

      public int invoke(InvokerRequest invokerRequest) throws InvokerException
      Description copied from interface: Invoker
      Invokes the Maven application using the provided InvokerRequest. This method is responsible for executing the Maven command or build process based on the information contained in the request.
      Specified by:
      invoke in interface Invoker
      Parameters:
      invokerRequest - the request containing all necessary information for the invocation
      Returns:
      an integer representing the exit code of the invocation (0 typically indicates success)
      Throws:
      InvokerException - if an error occurs during the invocation process
    • validate

      protected void validate(InvokerRequest invokerRequest) throws InvokerException
      Throws:
      InvokerException