Class ForkedMavenExecutor
java.lang.Object
org.apache.maven.cling.executor.forked.ForkedMavenExecutor
- All Implemented Interfaces:
AutoCloseable
,Executor
-
Field Summary
FieldsFields inherited from interface org.apache.maven.api.cli.Executor
IS_WINDOWS, UNKNOWN_VERSION
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected int
doExecute
(ExecutorRequest executorRequest) int
execute
(ExecutorRequest executorRequest) Invokes the tool application using the providedExecutorRequest
.mavenVersion
(ExecutorRequest executorRequest) Returns the Maven version that providedExecutorRequest
point at (would use).protected CountDownLatch
pump
(Process p, ExecutorRequest executorRequest) protected void
validate
(ExecutorRequest executorRequest)
-
Field Details
-
useMavenArgsEnv
protected final boolean useMavenArgsEnv
-
-
Constructor Details
-
ForkedMavenExecutor
public ForkedMavenExecutor() -
ForkedMavenExecutor
public ForkedMavenExecutor(boolean useMavenArgsEnv)
-
-
Method Details
-
execute
Description copied from interface:Executor
Invokes the tool application using the providedExecutorRequest
. This method is responsible for executing the command or build process based on the information contained in the request.- Specified by:
execute
in interfaceExecutor
- Parameters:
executorRequest
- the request containing all necessary information for the execution- Returns:
- an integer representing the exit code of the execution (0 typically indicates success)
- Throws:
ExecutorException
- if an error occurs during the execution process
-
mavenVersion
Description copied from interface:Executor
Returns the Maven version that providedExecutorRequest
point at (would use). This operation, depending on the underlying implementation, can be costly. If a caller uses this method often, it is the caller's responsibility to properly cache returned values. (key can beExecutorRequest.installationDirectory()
.- Specified by:
mavenVersion
in interfaceExecutor
- Parameters:
executorRequest
- the request containing all necessary information for the execution- Returns:
- a string representing the Maven version or
Executor.UNKNOWN_VERSION
- Throws:
ExecutorException
- if an error occurs during the execution process
-
validate
- Throws:
ExecutorException
-
doExecute
- Throws:
ExecutorException
-
pump
-