|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Provides a facade to invoke Maven.
| Field Summary | |
static java.lang.String |
ROLE
The role name used to register implementations of this interface within Plexus. |
static java.lang.String |
userHome
Deprecated. Query this property by yourself, this has nothing to do with invoking Maven and as such does not belong into this API! |
| Method Summary | |
InvocationResult |
execute(InvocationRequest request)
Executes Maven using the parameters specified by the given invocation request. |
java.io.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. |
java.io.File |
getMavenHome()
Gets the path to the base directory of the Maven installation used to invoke Maven. |
java.io.File |
getWorkingDirectory()
Gets the working directory for the Maven invocation. |
Invoker |
setErrorHandler(InvocationOutputHandler errorHandler)
Sets the handler used to capture the error output from the Maven build. |
Invoker |
setInputStream(java.io.InputStream inputStream)
Sets the input stream used to provide input for the invoked Maven build. |
Invoker |
setLocalRepositoryDirectory(java.io.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 |
setMavenHome(java.io.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(java.io.File workingDirectory)
Sets the working directory for the Maven invocation. |
| Field Detail |
public static final java.lang.String ROLE
public static final java.lang.String userHome
| Method Detail |
public InvocationResult execute(InvocationRequest request)
throws MavenInvocationException
request - The invocation request to execute, must not be null.
null.
MavenInvocationExceptionpublic java.io.File getLocalRepositoryDirectory()
null to use the location from
the settings.xml.public java.io.File getWorkingDirectory()
null if the working directory is derived
from the base directory of the processed POM.public InvokerLogger getLogger()
null.public java.io.File getMavenHome()
null if using the default
Maven installation.public Invoker setMavenHome(java.io.File mavenHome)
maven.home and the environment variable M2_HOME.
mavenHome - The path to the base directory of the Maven installation, may be null to use the
default Maven installation.
public Invoker setLocalRepositoryDirectory(java.io.File localRepositoryDirectory)
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)
logger - The logger used by this invoker to output diagnostic messages, may be null to use a
default logger.
public Invoker setWorkingDirectory(java.io.File workingDirectory)
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 Invoker setInputStream(java.io.InputStream inputStream)
inputStream - The input stream used to provide input for the invoked Maven build, may be null
if not required.
public Invoker setOutputHandler(InvocationOutputHandler outputHandler)
outputHandler - The output handler, may be null if the output is not of interest.
public Invoker setErrorHandler(InvocationOutputHandler errorHandler)
errorHandler - The error handler, may be null if the output is not of interest.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||