public abstract class AbstractRunMojo extends AbstractTomcat7Mojo
| Modifier and Type | Field and Description |
|---|---|
protected String[] |
aliases
configure aliases
see Host Name aliases
|
protected int |
backgroundProcessorDelay
represents the delay in seconds between each classPathScanning change invocation
|
protected String |
classLoaderClass
Class loader class to set.
|
protected String |
clientAuth
enable client authentication for https (if configured)
see http://tomcat.apache.org/tomcat-7.0-doc/config/http.html#SSL_Support_-_BIO_and_NIO
|
protected File |
contextFile
The path of the Tomcat context XML file.
|
protected boolean |
contextReloadable
Force context scanning if you don't use a context file with reloadable = "true".
|
protected org.apache.maven.artifact.factory.ArtifactFactory |
factory
Used to look up Artifacts in the remote repository.
|
protected String |
hostName
configure host name
|
protected boolean |
jarScanAllDirectories
In case a module in your reactors has some web-fragments they will be read.
|
protected org.apache.maven.shared.filtering.MavenFileFilter |
mavenFileFilter |
protected org.apache.maven.project.MavenProject |
project
The maven project.
|
protected String |
propertiesPortFilePath
Will dump port in a properties file (see ports for property names).
|
protected org.apache.maven.artifact.resolver.ArtifactResolver |
resolver
Used to look up Artifacts in the remote repository.
|
protected org.apache.maven.execution.MavenSession |
session |
protected boolean |
skip
Skip execution
|
protected String |
trustManagerClassName |
protected String |
trustMaxCertLength |
protected String |
truststoreAlgorithm |
protected String |
truststoreFile |
protected String |
truststorePass |
protected String |
truststoreProvider |
protected String |
truststoreType |
protected boolean |
useBodyEncodingForURI |
protected boolean |
useSeparateTomcatClassLoader
if
true a new classLoader separated from maven core will be created to start tomcat. |
messagesProvider, path, settingsROLE| Constructor and Description |
|---|
AbstractRunMojo() |
| Modifier and Type | Method and Description |
|---|---|
protected Context |
createContext(Tomcat 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.
|
void |
execute() |
protected org.apache.maven.artifact.Artifact |
getArtifact(AbstractWebapp additionalWebapp)
Resolves the Artifact from the remote repository if necessary.
|
protected abstract File |
getContextFile()
Gets the Tomcat context XML file to use.
|
protected abstract File |
getDocBase()
Gets the webapp directory to run.
|
protected String |
getPath()
Gets the webapp context path to use for the web application being run.
|
Set<org.apache.maven.artifact.Artifact> |
getProjectArtifacts() |
protected org.codehaus.plexus.classworlds.realm.ClassRealm |
getTomcatClassLoader() |
protected boolean |
isContextReloadable()
Determine whether the passed context.xml file declares the context as reloadable or not.
|
protected boolean |
isWar()
Gets whether this project uses WAR packaging.
|
protected StandardContext |
parseContextFile(File file) |
checkTomcatResponsegetLog, getPluginContext, setLog, setPluginContext@Component protected org.apache.maven.artifact.factory.ArtifactFactory factory
@Component protected org.apache.maven.artifact.resolver.ArtifactResolver resolver
@Component protected org.apache.maven.project.MavenProject project
@Parameter(property="tomcat.useSeparateTomcatClassLoader", defaultValue="false") protected boolean useSeparateTomcatClassLoader
true a new classLoader separated from maven core will be created to start tomcat.@Parameter(property="maven.tomcat.contextReloadable", defaultValue="false") protected boolean contextReloadable
@Parameter(property="maven.tomcat.backgroundProcessorDelay", defaultValue="-1") protected int backgroundProcessorDelay
@Parameter(property="maven.tomcat.contextFile") protected File contextFile
The path of the Tomcat context XML file.
Since release 2.0, the file is filtered as a maven resource so you can use interpolation tokens ${ }
@Parameter(property="maven.tomcat.skip", defaultValue="false") protected boolean skip
@Parameter protected String classLoaderClass
@Parameter(defaultValue="${session}", readonly=true, required=true) protected org.apache.maven.execution.MavenSession session
@Parameter(property="maven.tomcat.propertiesPortFilePath") protected String propertiesPortFilePath
@Parameter(property="maven.tomcat.hostName", defaultValue="localhost") protected String hostName
@Parameter protected String[] aliases
@Parameter(property="maven.tomcat.https.clientAuth", defaultValue="false") protected String clientAuth
@Component(role=org.apache.maven.shared.filtering.MavenFileFilter.class, hint="default") protected org.apache.maven.shared.filtering.MavenFileFilter mavenFileFilter
@Parameter(property="maven.tomcat.jarScan.allDirectories", defaultValue="true") protected boolean jarScanAllDirectories
@Parameter(property="maven.tomcat.useBodyEncodingForURI", defaultValue="false") protected boolean useBodyEncodingForURI
@Parameter protected String trustManagerClassName
@Parameter protected String trustMaxCertLength
@Parameter protected String truststoreAlgorithm
@Parameter protected String truststoreFile
@Parameter protected String truststorePass
@Parameter protected String truststoreProvider
@Parameter protected String truststoreType
public void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
protected String getPath()
getPath in class AbstractTomcat7Mojoprotected Context createContext(Tomcat container) throws IOException, org.apache.maven.plugin.MojoExecutionException, javax.servlet.ServletException
container - the embedded Tomcat container being usedIOException - if the context could not be createdorg.apache.maven.plugin.MojoExecutionException - in case of an error creating the contextjavax.servlet.ServletExceptionprotected StandardContext parseContextFile(File file) throws org.apache.maven.plugin.MojoExecutionException
protected WebappLoader createWebappLoader() throws IOException, org.apache.maven.plugin.MojoExecutionException
IOException - if the webapp loader could not be createdorg.apache.maven.plugin.MojoExecutionException - in case of an error creating the webapp loaderprotected boolean isContextReloadable()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected abstract File getDocBase() throws IOException
IOExceptionprotected abstract File getContextFile() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected boolean isWar()
protected org.codehaus.plexus.classworlds.realm.ClassRealm getTomcatClassLoader()
throws org.apache.maven.plugin.MojoExecutionException
public Set<org.apache.maven.artifact.Artifact> getProjectArtifacts()
protected org.apache.maven.artifact.Artifact getArtifact(AbstractWebapp additionalWebapp) throws org.apache.maven.plugin.MojoExecutionException
additionalWebapp - containing information about artifact from plugin configuration.org.apache.maven.plugin.MojoExecutionException - with a message if the version can't be found in DependencyManagement.Copyright © 2005–2014 The Apache Software Foundation. All rights reserved.