Class ForkedMavenInvoker
java.lang.Object
org.apache.maven.cling.invoker.mvn.forked.ForkedMavenInvoker
- All Implemented Interfaces:
AutoCloseable
,Invoker
Forked invoker implementation, that spawns a subprocess with Maven from the installation directory.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
invoke
(InvokerRequest invokerRequest) Invokes the Maven application using the providedInvokerRequest
.protected void
validate
(InvokerRequest invokerRequest)
-
Constructor Details
-
ForkedMavenInvoker
public ForkedMavenInvoker()
-
-
Method Details
-
invoke
Description copied from interface:Invoker
Invokes the Maven application using the providedInvokerRequest
. This method is responsible for executing the Maven command or build process based on the information contained in the request.- Specified by:
invoke
in interfaceInvoker
- 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
- Throws:
InvokerException
-