|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.maven.plugin.AbstractMojo org.apache.tomcat.maven.plugin.tomcat6.AbstractI18NTomcat6Mojo org.apache.tomcat.maven.plugin.tomcat6.AbstractRunMojo
public abstract class AbstractRunMojo
Abstract goal that provides common configuration for embedded Tomcat goals.
Field Summary | |
---|---|
protected org.apache.maven.artifact.factory.ArtifactFactory |
artifactFactory
Used to look up Artifacts in the remote repository. |
protected org.apache.maven.artifact.resolver.ArtifactResolver |
artifactResolver
Used to look up Artifacts in the remote repository. |
protected String |
classLoaderClass
Class loader class to set. |
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.project.MavenProject |
project
The maven project. |
protected boolean |
skip
Skip execution |
protected boolean |
useSeparateTomcatClassLoader
if true a new classLoader separated from maven core will be created to start tomcat. |
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 | |
---|---|
AbstractRunMojo()
|
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. |
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. |
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 |
---|
@Component(role=org.apache.maven.artifact.factory.ArtifactFactory.class) protected org.apache.maven.artifact.factory.ArtifactFactory artifactFactory
@Component(role=org.apache.maven.artifact.resolver.ArtifactResolver.class) protected org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver
@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(defaultValue="src/main/webapp/META-INF/context.xml") protected File contextFile
@Parameter(property="maven.tomcat.skip", defaultValue="false") protected boolean skip
@Parameter protected String classLoaderClass
Constructor Detail |
---|
public AbstractRunMojo()
Method Detail |
---|
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
protected String getPath()
getPath
in class AbstractI18NTomcat6Mojo
protected Context createContext(Embedded container) throws IOException, org.apache.maven.plugin.MojoExecutionException
container
- the embedded Tomcat container being used
IOException
- if the context could not be created
org.apache.maven.plugin.MojoExecutionException
- in case of an error creating the contextprotected WebappLoader createWebappLoader() throws IOException, org.apache.maven.plugin.MojoExecutionException
IOException
- if the webapp loader could not be created
org.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.MojoExecutionException
protected abstract File getDocBase()
protected abstract File getContextFile() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected boolean isWar()
protected org.codehaus.plexus.classworlds.realm.ClassRealm getTomcatClassLoader() throws org.apache.maven.plugin.MojoExecutionException
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |