org.apache.maven.shared.invoker
Class DefaultInvoker

java.lang.Object
  extended by org.apache.maven.shared.invoker.DefaultInvoker
All Implemented Interfaces:
Invoker

public class DefaultInvoker
extends java.lang.Object
implements Invoker

Class intended to be used by clients who wish to invoke a forked Maven process from their applications

Author:
jdcasey

Field Summary
private static InvocationOutputHandler DEFAULT_OUTPUT_HANDLER
           
private  InvocationOutputHandler errorHandler
           
private  java.io.InputStream inputStream
           
private  java.io.File localRepositoryDirectory
           
private  InvokerLogger logger
           
private  java.io.File mavenHome
           
private  InvocationOutputHandler outputHandler
           
static java.lang.String ROLE_HINT
           
private  java.io.File workingDirectory
           
 
Fields inherited from interface org.apache.maven.shared.invoker.Invoker
ROLE, userHome
 
Constructor Summary
DefaultInvoker()
           
 
Method Summary
 InvocationResult execute(InvocationRequest request)
           
private  int executeCommandLine(org.codehaus.plexus.util.cli.Commandline cli, InvocationRequest request)
           
 java.io.File getLocalRepositoryDirectory()
           
 InvokerLogger getLogger()
           
 java.io.File getMavenHome()
           
 java.io.File getWorkingDirectory()
           
 Invoker setErrorHandler(InvocationOutputHandler errorHandler)
           
 Invoker setInputStream(java.io.InputStream inputStream)
           
 Invoker setLocalRepositoryDirectory(java.io.File localRepositoryDirectory)
           
 Invoker setLogger(InvokerLogger logger)
           
 Invoker setMavenHome(java.io.File mavenHome)
           
 Invoker setOutputHandler(InvocationOutputHandler outputHandler)
           
 Invoker setWorkingDirectory(java.io.File workingDirectory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROLE_HINT

public static final java.lang.String ROLE_HINT
See Also:
Constant Field Values

DEFAULT_OUTPUT_HANDLER

private static final InvocationOutputHandler DEFAULT_OUTPUT_HANDLER

localRepositoryDirectory

private java.io.File localRepositoryDirectory

logger

private InvokerLogger logger

workingDirectory

private java.io.File workingDirectory

mavenHome

private java.io.File mavenHome

outputHandler

private InvocationOutputHandler outputHandler

inputStream

private java.io.InputStream inputStream

errorHandler

private InvocationOutputHandler errorHandler
Constructor Detail

DefaultInvoker

public DefaultInvoker()
Method Detail

execute

public InvocationResult execute(InvocationRequest request)
                         throws MavenInvocationException
Specified by:
execute in interface Invoker
Throws:
MavenInvocationException

executeCommandLine

private int executeCommandLine(org.codehaus.plexus.util.cli.Commandline cli,
                               InvocationRequest request)
                        throws org.codehaus.plexus.util.cli.CommandLineException
Throws:
org.codehaus.plexus.util.cli.CommandLineException

getLocalRepositoryDirectory

public java.io.File getLocalRepositoryDirectory()
Specified by:
getLocalRepositoryDirectory in interface Invoker

getLogger

public InvokerLogger getLogger()
Specified by:
getLogger in interface Invoker

setLocalRepositoryDirectory

public Invoker setLocalRepositoryDirectory(java.io.File localRepositoryDirectory)
Specified by:
setLocalRepositoryDirectory in interface Invoker

setLogger

public Invoker setLogger(InvokerLogger logger)
Specified by:
setLogger in interface Invoker

getWorkingDirectory

public java.io.File getWorkingDirectory()
Specified by:
getWorkingDirectory in interface Invoker

setWorkingDirectory

public Invoker setWorkingDirectory(java.io.File workingDirectory)
Specified by:
setWorkingDirectory in interface Invoker

getMavenHome

public java.io.File getMavenHome()
Specified by:
getMavenHome in interface Invoker

setMavenHome

public Invoker setMavenHome(java.io.File mavenHome)
Specified by:
setMavenHome in interface Invoker

setErrorHandler

public Invoker setErrorHandler(InvocationOutputHandler errorHandler)
Specified by:
setErrorHandler in interface Invoker

setInputStream

public Invoker setInputStream(java.io.InputStream inputStream)
Specified by:
setInputStream in interface Invoker

setOutputHandler

public Invoker setOutputHandler(InvocationOutputHandler outputHandler)
Specified by:
setOutputHandler in interface Invoker