org.apache.tomcat.maven.plugin.tomcat6
Class RunMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.tomcat.maven.plugin.tomcat6.AbstractI18NTomcat6Mojo
          extended by org.apache.tomcat.maven.plugin.tomcat6.AbstractRunMojo
              extended by org.apache.tomcat.maven.plugin.tomcat6.RunMojo
All Implemented Interfaces:
ContextEnabled, Mojo

public class RunMojo
extends AbstractRunMojo

Runs the current project as a dynamic web application using an embedded Tomcat server.

Version:
$Id: RunMojo.html 1305321 2012-03-26 12:01:12Z olamy $
Author:
Jurgen Lust, Mark Hobson
Is defined to be executed in:
phase:
compile
Is defined by the goal name:
run
Requires the dependencies in this specified scope:
test

Field Summary
protected  int backgroundProcessorDelay
          represents the delay in seconds between each classPathScanning change invocation
 
Fields inherited from class org.apache.tomcat.maven.plugin.tomcat6.AbstractRunMojo
contextFile, contextReloadable, project, useSeparateTomcatClassLoader
 
Fields inherited from class org.apache.tomcat.maven.plugin.tomcat6.AbstractI18NTomcat6Mojo
messagesProvider, path
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
RunMojo()
           
 
Method Summary
protected  Context createContext(Embedded container)
          Gets the context to run this web application under for the specified embedded Tomcat.
protected  WebappLoader createWebappLoader()
          Gets the webapp loader to run this web application under.
protected  File getContextFile()
          Gets the Tomcat context XML file to use.
protected  File getDocBase()
          Gets the webapp directory to run.
 
Methods inherited from class org.apache.tomcat.maven.plugin.tomcat6.AbstractRunMojo
execute, getPath, getProjectArtifacts, getTomcatClassLoader, isContextReloadable, isWar
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

backgroundProcessorDelay

protected int backgroundProcessorDelay
represents the delay in seconds between each classPathScanning change invocation

See Also:
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html
Is defined by:
expression:
${maven.tomcat.backgroundProcessorDelay}
default-value:
-1
Constructor Detail

RunMojo

public RunMojo()
Method Detail

createContext

protected Context createContext(Embedded container)
                         throws IOException,
                                MojoExecutionException
Gets the context to run this web application under for the specified embedded Tomcat.

Overrides:
createContext in class AbstractRunMojo
Parameters:
container - the embedded Tomcat container being used
Returns:
the context to run this web application under
Throws:
MojoExecutionException
IOException - if the context could not be created

createWebappLoader

protected WebappLoader createWebappLoader()
                                   throws IOException,
                                          MojoExecutionException
Gets the webapp loader to run this web application under.

Overrides:
createWebappLoader in class AbstractRunMojo
Returns:
the webapp loader to use
Throws:
MojoExecutionException
IOException - if the webapp loader could not be created

getDocBase

protected File getDocBase()
Gets the webapp directory to run.

Specified by:
getDocBase in class AbstractRunMojo
Returns:
the webapp directory

getContextFile

protected File getContextFile()
                       throws MojoExecutionException
Gets the Tomcat context XML file to use.

Specified by:
getContextFile in class AbstractRunMojo
Returns:
the context XML file
Throws:
MojoExecutionException


Copyright © 2005-2012 The Apache Software Foundation. All Rights Reserved.