| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.maven.shared.invoker.DefaultInvoker
@Component(role=Invoker.class,
           hint="default")
public class DefaultInvokerClass intended to be used by clients who wish to invoke a forked Maven process from their applications
| Field Summary | |
|---|---|
static String | 
ROLE_HINT
 | 
| Fields inherited from interface org.apache.maven.shared.invoker.Invoker | 
|---|
ROLE, userHome | 
| Constructor Summary | |
|---|---|
DefaultInvoker()
 | 
|
| Method Summary | |
|---|---|
 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)
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.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final String ROLE_HINT
| Constructor Detail | 
|---|
public DefaultInvoker()
| Method Detail | 
|---|
public InvocationResult execute(InvocationRequest request)
                         throws MavenInvocationException
Invoker
execute in interface Invokerrequest - The invocation request to execute, must not be null.
null.
MavenInvocationExceptionpublic File getLocalRepositoryDirectory()
Invoker
getLocalRepositoryDirectory in interface Invokernull to use the location from
         the settings.xml.public InvokerLogger getLogger()
Invoker
getLogger in interface Invokernull.public Invoker setLocalRepositoryDirectory(File localRepositoryDirectory)
Invoker
setLocalRepositoryDirectory in interface InvokerlocalRepositoryDirectory - 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)
Invoker
setLogger in interface Invokerlogger - The logger used by this invoker to output diagnostic messages, may be null to use a
            default logger.
public File getWorkingDirectory()
Invoker
getWorkingDirectory in interface Invokernull if the working directory is derived
         from the base directory of the processed POM.public Invoker setWorkingDirectory(File workingDirectory)
Invoker
setWorkingDirectory in interface InvokerworkingDirectory - 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()
Invoker
getMavenHome in interface Invokernull if using the default
         Maven installation.public Invoker setMavenHome(File mavenHome)
Invokermaven.home and the environment variable M2_HOME.
setMavenHome in interface InvokermavenHome - The path to the base directory of the Maven installation, may be null to use the
            default Maven installation.
public File getMavenExecutable()
Invoker
getMavenExecutable in interface Invokernullpublic Invoker setMavenExecutable(File mavenExecutable)
InvokermavenExecutable can either be a file relative to ${maven.home}/bin/ or an absolute file.
setMavenExecutable in interface InvokermavenExecutable - the executable
public Invoker setErrorHandler(InvocationOutputHandler errorHandler)
Invoker
setErrorHandler in interface InvokererrorHandler - The error handler, may be null if the output is not of interest.
public Invoker setInputStream(InputStream inputStream)
Invoker
setInputStream in interface InvokerinputStream - The input stream used to provide input for the invoked Maven build, may be null
            if not required.
public Invoker setOutputHandler(InvocationOutputHandler outputHandler)
Invoker
setOutputHandler in interface InvokeroutputHandler - The output 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 | ||||||||