Package org.apache.maven.shared.invoker
Class DefaultInvocationResult
- java.lang.Object
-
- org.apache.maven.shared.invoker.DefaultInvocationResult
-
- All Implemented Interfaces:
InvocationResult
public final class DefaultInvocationResult extends java.lang.Object implements InvocationResult
Describes the result of a Maven invocation.
-
-
Field Summary
Fields Modifier and Type Field Description private org.apache.maven.shared.utils.cli.CommandLineExceptionexecutionExceptionThe exception that prevented to execute the command line, will benullif Maven could be successfully started.private intexitCodeThe exit code reported by the Maven invocation.
-
Constructor Summary
Constructors Constructor Description DefaultInvocationResult()Creates a new invocation result
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.maven.shared.utils.cli.CommandLineExceptiongetExecutionException()Gets the exception that possibly occurred during the execution of the command line.intgetExitCode()Gets the exit code from the Maven invocation.(package private) voidsetExecutionException(org.apache.maven.shared.utils.cli.CommandLineException executionException)Sets the exception that prevented to execute the command line.(package private) voidsetExitCode(int exitCode)Sets the exit code reported by the Maven invocation.
-
-
-
Field Detail
-
executionException
private org.apache.maven.shared.utils.cli.CommandLineException executionException
The exception that prevented to execute the command line, will benullif Maven could be successfully started.
-
exitCode
private int exitCode
The exit code reported by the Maven invocation.
-
-
Method Detail
-
getExitCode
public int getExitCode()
Description copied from interface:InvocationResultGets the exit code from the Maven invocation. A non-zero value indicates a build failure. Note: This value is undefined ifInvocationResult.getExecutionException()reports an exception.- Specified by:
getExitCodein interfaceInvocationResult- Returns:
- The exit code from the Maven invocation.
-
getExecutionException
public org.apache.maven.shared.utils.cli.CommandLineException getExecutionException()
Description copied from interface:InvocationResultGets the exception that possibly occurred during the execution of the command line.- Specified by:
getExecutionExceptionin interfaceInvocationResult- Returns:
- The exception that prevented to invoke Maven or
nullif the command line was successfully processed by the operating system.
-
setExitCode
void setExitCode(int exitCode)
Sets the exit code reported by the Maven invocation.- Parameters:
exitCode- The exit code reported by the Maven invocation.
-
setExecutionException
void setExecutionException(org.apache.maven.shared.utils.cli.CommandLineException executionException)
Sets the exception that prevented to execute the command line.- Parameters:
executionException- The exception that prevented to execute the command line, may benull.
-
-