Modifier and Type | Field and Description |
---|---|
static String |
ROLE_HINT
Constant
ROLE_HINT="default" |
Constructor and Description |
---|
DefaultInvoker() |
Modifier and Type | Method and Description |
---|---|
InvocationResult |
execute(InvocationRequest request)
Executes Maven using the parameters specified by the given invocation request.
|
File |
getLocalRepositoryDirectory()
Getter for the field
localRepositoryDirectory . |
InvokerLogger |
getLogger()
Getter for the field
logger . |
File |
getMavenExecutable()
Getter for the field
mavenExecutable . |
File |
getMavenHome()
Getter for the field
mavenHome . |
File |
getWorkingDirectory()
Getter for the field
workingDirectory . |
Invoker |
setErrorHandler(InvocationOutputHandler errorHandler)
Sets the handler used to capture the error output from the Maven build.
|
Invoker |
setInputStream(InputStream inputStream)
Sets the input stream used to provide input for the invoked Maven build.
|
Invoker |
setLocalRepositoryDirectory(File localRepositoryDirectory)
Sets the path to the base directory of the local repository to use for the Maven invocation.
|
Invoker |
setLogger(InvokerLogger logger)
Sets the logger used by this invoker to output diagnostic messages.
|
Invoker |
setMavenExecutable(File mavenExecutable)
mavenExecutable can either be a file relative to ${maven.home}/bin/ or an absolute file. |
Invoker |
setMavenHome(File mavenHome)
Sets the path to the base directory of the Maven installation used to invoke Maven.
|
Invoker |
setOutputHandler(InvocationOutputHandler outputHandler)
Sets the handler used to capture the standard output from the Maven build.
|
Invoker |
setWorkingDirectory(File workingDirectory)
Sets the working directory for the Maven invocation.
|
public static final String ROLE_HINT
ROLE_HINT="default"
public InvocationResult execute(InvocationRequest request) throws MavenInvocationException
execute
in interface Invoker
request
- The invocation request to execute, must not be null
.null
.MavenInvocationException
- if cannot configure correctly execution parameterspublic File getLocalRepositoryDirectory()
Getter for the field localRepositoryDirectory
.
getLocalRepositoryDirectory
in interface Invoker
File
object.public InvokerLogger getLogger()
Getter for the field logger
.
getLogger
in interface Invoker
InvokerLogger
object.public Invoker setLocalRepositoryDirectory(File localRepositoryDirectory)
setLocalRepositoryDirectory
in interface Invoker
localRepositoryDirectory
- The path to the base directory of the local repository or null
to
use the ___location from the settings.xml
.public Invoker setLogger(InvokerLogger logger)
public File getWorkingDirectory()
Getter for the field workingDirectory
.
getWorkingDirectory
in interface Invoker
File
object.public Invoker setWorkingDirectory(File workingDirectory)
setWorkingDirectory
in interface Invoker
workingDirectory
- The working directory for the Maven invocation, may be null
to derive the
working directory from the base directory of the processed POM.public File getMavenHome()
Getter for the field mavenHome
.
getMavenHome
in interface Invoker
File
object.public Invoker setMavenHome(File mavenHome)
maven.home
.setMavenHome
in interface Invoker
mavenHome
- The path to the base directory of the Maven installation, may be null
to use the
default Maven installation.public File getMavenExecutable()
Getter for the field mavenExecutable
.
getMavenExecutable
in interface Invoker
File
object.public Invoker setMavenExecutable(File mavenExecutable)
mavenExecutable
can either be a file relative to ${maven.home}/bin/ or an absolute file.setMavenExecutable
in interface Invoker
mavenExecutable
- the executablepublic Invoker setErrorHandler(InvocationOutputHandler errorHandler)
setErrorHandler
in interface Invoker
errorHandler
- The error handler, may be null
if the output is not of interest.public Invoker setInputStream(InputStream inputStream)
setInputStream
in interface Invoker
inputStream
- The input stream used to provide input for the invoked Maven build, may be null
if not required.public Invoker setOutputHandler(InvocationOutputHandler outputHandler)
setOutputHandler
in interface Invoker
outputHandler
- The output handler, may be null
if the output is not of interest.Copyright © 2002–2022 The Apache Software Foundation. All rights reserved.