Package org.apache.maven.api.cli.mvn
Interface MavenInvoker<R extends MavenInvokerRequest<? extends MavenOptions>>
- Type Parameters:
R
- The specific type ofMavenInvokerRequest
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
-
Method Details
-
invoke
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 interfaceInvoker<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
-