public interface Invoker
Modifier and Type | Field and Description |
---|---|
static String |
ROLE
The role name used to register implementations of this interface within Plexus.
|
Modifier and Type | Method and Description |
---|---|
InvocationResult |
execute(InvocationRequest request)
Executes Maven using the parameters specified by the given invocation request.
|
File |
getLocalRepositoryDirectory()
Gets the path to the base directory of the local repository to use for the Maven invocation.
|
InvokerLogger |
getLogger()
Gets the logger used by this invoker to output diagnostic messages.
|
File |
getMavenExecutable()
Get the customized File of the Maven executable.
|
File |
getMavenHome()
Gets the path to the base directory of the Maven installation used to invoke Maven.
|
File |
getWorkingDirectory()
Gets the working directory for the Maven invocation.
|
Invoker |
setErrorHandler(InvocationOutputHandler errorHandler)
Deprecated.
|
Invoker |
setInputStream(InputStream inputStream)
Deprecated.
|
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)
Deprecated.
|
Invoker |
setWorkingDirectory(File workingDirectory)
Deprecated.
Please use
InvocationRequest.setBaseDirectory(File) |
static final String ROLE
InvocationResult execute(InvocationRequest request) throws MavenInvocationException
request
- The invocation request to execute, must not be null
.null
.MavenInvocationException
- if cannot configure correctly execution parametersFile getLocalRepositoryDirectory()
null
to use the location from
the settings.xml
.File getWorkingDirectory()
null
if the working directory is derived
from the base directory of the processed POM.InvokerLogger getLogger()
null
.File getMavenHome()
null
if using the default
Maven installation.Invoker setMavenHome(File mavenHome)
maven.home
.mavenHome
- The path to the base directory of the Maven installation, may be null
to use the
default Maven installation.File getMavenExecutable()
null
Invoker setMavenExecutable(File mavenExecutable)
mavenExecutable
can either be a file relative to ${maven.home}/bin/ or an absolute file.mavenExecutable
- the executableInvoker setLocalRepositoryDirectory(File localRepositoryDirectory)
localRepositoryDirectory
- The path to the base directory of the local repository or null
to
use the location from the settings.xml
.Invoker setLogger(InvokerLogger logger)
logger
- The logger used by this invoker to output diagnostic messages, may be null
to use a
default logger.@Deprecated Invoker setWorkingDirectory(File workingDirectory)
InvocationRequest.setBaseDirectory(File)
workingDirectory
- The working directory for the Maven invocation, may be null
to derive the
working directory from the base directory of the processed POM.@Deprecated Invoker setInputStream(InputStream inputStream)
InvocationRequest.setInputStream(InputStream)
inputStream
- The input stream used to provide input for the invoked Maven build, may be null
if not required.@Deprecated Invoker setOutputHandler(InvocationOutputHandler outputHandler)
InvocationRequest.setOutputHandler(InvocationOutputHandler)
outputHandler
- The output handler, may be null
if the output is not of interest.@Deprecated Invoker setErrorHandler(InvocationOutputHandler errorHandler)
InvocationRequest.setErrorHandler(InvocationOutputHandler)
errorHandler
- The error handler, may be null
if the output is not of interest.Copyright © 2002–2022 The Apache Software Foundation. All rights reserved.