Class DefaultForkedMavenInvoker
java.lang.Object
org.apache.maven.cling.invoker.mvn.forked.DefaultForkedMavenInvoker
- All Implemented Interfaces:
AutoCloseable
,Invoker<ForkedMavenInvokerRequest>
,ForkedMavenInvoker
,MavenInvoker<ForkedMavenInvokerRequest>
Forked invoker implementation, it spawns a subprocess with Maven.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
invoke
(ForkedMavenInvokerRequest invokerRequest) Invokes Maven using the provided MavenInvokerRequest.protected void
validate
(ForkedMavenInvokerRequest invokerRequest)
-
Constructor Details
-
DefaultForkedMavenInvoker
public DefaultForkedMavenInvoker()
-
-
Method Details
-
invoke
Description copied from interface:MavenInvoker
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<ForkedMavenInvokerRequest>
- Specified by:
invoke
in interfaceMavenInvoker<ForkedMavenInvokerRequest>
- 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
-
validate
- Throws:
InvokerException
-