org.apache.tomcat.maven.plugin.tomcat6
Class RunMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.tomcat.maven.plugin.tomcat6.AbstractI18NTomcat6Mojo
org.apache.tomcat.maven.plugin.tomcat6.AbstractRunMojo
org.apache.tomcat.maven.plugin.tomcat6.RunMojo
- All Implemented Interfaces:
- org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
@Mojo(name="run",
requiresDependencyResolution=TEST,
threadSafe=true)
@Execute(phase=PROCESS_CLASSES)
public class RunMojo- extends AbstractRunMojo
Runs the current project as a dynamic web application using an embedded Tomcat server.
- Author:
- Jurgen Lust, Mark Hobson
| Fields inherited from class org.apache.tomcat.maven.plugin.tomcat6.AbstractRunMojo |
aliases, artifactFactory, artifactResolver, backgroundProcessorDelay, classLoaderClass, contextFile, contextReloadable, hostName, mavenFileFilter, project, session, skip, useBodyEncodingForURI, useSeparateTomcatClassLoader |
| Fields inherited from interface org.apache.maven.plugin.Mojo |
ROLE |
|
Method Summary |
protected org.apache.catalina.Context |
createContext(org.apache.catalina.startup.Embedded container)
Gets the context to run this web application under for the specified embedded Tomcat. |
protected org.apache.catalina.loader.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.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 |
RunMojo
public RunMojo()
createContext
protected org.apache.catalina.Context createContext(org.apache.catalina.startup.Embedded container)
throws IOException,
org.apache.maven.plugin.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:
org.apache.maven.plugin.MojoExecutionException
IOException - if the context could not be created
createWebappLoader
protected org.apache.catalina.loader.WebappLoader createWebappLoader()
throws IOException,
org.apache.maven.plugin.MojoExecutionException
- Gets the webapp loader to run this web application under.
- Overrides:
createWebappLoader in class AbstractRunMojo
- Returns:
- the webapp loader to use
- Throws:
org.apache.maven.plugin.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 org.apache.maven.plugin.MojoExecutionException
- Gets the Tomcat context XML file to use.
- Specified by:
getContextFile in class AbstractRunMojo
- Returns:
- the context XML file
- Throws:
org.apache.maven.plugin.MojoExecutionException
Copyright © 2005–2013 The Apache Software Foundation. All rights reserved.