public abstract class AbstractExecWarMojo extends AbstractTomcat7Mojo
Modifier and Type | Field and Description |
---|---|
protected String |
accessLogValveFormat
see http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html
|
protected org.apache.maven.artifact.factory.ArtifactFactory |
artifactFactory
Maven Artifact Factory component.
|
protected org.apache.maven.artifact.resolver.ArtifactResolver |
artifactResolver |
protected boolean |
attachArtifact
Attach or not the generated artifact to the build (use true if you want to install or deploy it)
|
protected String |
attachArtifactClassifier
the classifier to use for the attached/generated artifact
|
protected String |
attachArtifactClassifierType
the type to use for the attached/generated artifact
|
protected File |
buildDirectory |
protected String |
connectorHttpProtocol
which connector protocol to use HTTP/1.1 or org.apache.coyote.http11.Http11NioProtocol
|
protected boolean |
enableNaming
to enable naming when starting tomcat
|
protected String |
enableRemoteIpValve
see http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html
|
protected String[] |
excludes
File patterns to exclude from extraDependencies
|
protected List<ExtraDependency> |
extraDependencies
list of extra dependencies to add in the standalone tomcat jar: your jdbc driver, mail.jar etc..
|
protected List<ExtraResource> |
extraResources
list of extra resources to add in the standalone tomcat jar: your logger configuration etc
|
protected String |
finalName
Name of the generated exec JAR.
|
protected String |
httpPort
configure a default http port for the standalone jar
|
protected org.apache.maven.artifact.repository.ArtifactRepository |
local
Location of the local repository.
|
protected String |
mainClass
Main class to use for starting the standalone jar.
|
protected String |
path
The webapp context path to use for the web application being run.
|
protected List<org.apache.maven.artifact.Artifact> |
pluginArtifacts |
protected org.apache.maven.project.MavenProject |
project
The maven project.
|
protected org.apache.maven.artifact.Artifact |
projectArtifact |
protected org.apache.maven.project.MavenProjectHelper |
projectHelper |
protected List<org.apache.maven.artifact.repository.ArtifactRepository> |
remoteRepos
List of Remote Repositories used by the resolver
|
protected File |
serverXml |
protected File |
tomcatConfigurationFilesDirectory |
protected List<WarRunDependency> |
warRunDependencies |
messagesProvider, settings
ROLE
Constructor and Description |
---|
AbstractExecWarMojo() |
Modifier and Type | Method and Description |
---|---|
protected File |
addContextXmlToWar(File contextXmlFile,
File warFile)
return file can be deleted
|
protected void |
copyDirectoryContentIntoArchive(File sourceFolder,
String destinationPath,
org.apache.commons.compress.archivers.ArchiveOutputStream archiveOutputStream) |
void |
execute() |
protected void |
extractJarToArchive(JarFile file,
org.apache.commons.compress.archivers.ArchiveOutputStream os,
String[] excludes)
Copy the contents of a jar file to another archive
|
protected String |
findArtifactVersion(org.apache.maven.model.Dependency dependency) |
protected File |
resolvePluginWorkDir()
Resolves the plugin work dir as a sub directory of
buildDirectory , creating it if it does not exist. |
protected boolean |
sameDependencyWithoutVersion(org.apache.maven.model.Dependency that,
org.apache.maven.model.Dependency dependency) |
protected String[] |
toStringArray(List list) |
checkTomcatResponse, getPath
getLog, getPluginContext, setLog, setPluginContext
@Parameter(defaultValue="${project.artifact}", required=true, readonly=true) protected org.apache.maven.artifact.Artifact projectArtifact
@Parameter(defaultValue="${project}", required=true, readonly=true) protected org.apache.maven.project.MavenProject project
@Parameter(defaultValue="${plugin.artifacts}", required=true) protected List<org.apache.maven.artifact.Artifact> pluginArtifacts
@Parameter(defaultValue="${project.build.directory}") protected File buildDirectory
@Parameter(property="maven.tomcat.exec.war.tomcatConf", defaultValue="src/main/tomcatconf") protected File tomcatConfigurationFilesDirectory
@Parameter(defaultValue="src/main/tomcatconf/server.xml", property="maven.tomcat.exec.war.serverXml") protected File serverXml
@Parameter(property="tomcat.jar.finalName", defaultValue="${project.artifactId}-${project.version}-war-exec.jar", required=true) protected String finalName
@Parameter(property="maven.tomcat.path", defaultValue="${project.artifactId}", required=true) protected String path
@Parameter protected List<WarRunDependency> warRunDependencies
@Component protected org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver
@Component protected org.apache.maven.artifact.factory.ArtifactFactory artifactFactory
@Parameter(defaultValue="${localRepository}", required=true, readonly=true) protected org.apache.maven.artifact.repository.ArtifactRepository local
@Parameter(defaultValue="${project.remoteArtifactRepositories}", required=true, readonly=true) protected List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepos
@Component protected org.apache.maven.project.MavenProjectHelper projectHelper
@Parameter(property="maven.tomcat.exec.war.attachArtifact", defaultValue="true", required=true) protected boolean attachArtifact
@Parameter(property="maven.tomcat.exec.war.attachArtifactClassifier", defaultValue="exec-war", required=true) protected String attachArtifactClassifier
@Parameter(property="maven.tomcat.exec.war.attachArtifactType", defaultValue="jar", required=true) protected String attachArtifactClassifierType
@Parameter(property="maven.tomcat.exec.war.enableNaming", defaultValue="false", required=true) protected boolean enableNaming
@Parameter(property="maven.tomcat.exec.war.enableRemoteIpValve", defaultValue="true", required=true) protected String enableRemoteIpValve
@Parameter(property="maven.tomcat.exec.war.accessLogValveFormat", defaultValue="%h %l %u %t %r %s %b %I %D", required=true) protected String accessLogValveFormat
@Parameter protected List<ExtraDependency> extraDependencies
@Parameter protected List<ExtraResource> extraResources
@Parameter(property="maven.tomcat.exec.war.mainClass", defaultValue="org.apache.tomcat.maven.runner.Tomcat7RunnerCli", required=true) protected String mainClass
@Parameter(property="maven.tomcat.exec.war.connectorHttpProtocol", defaultValue="HTTP/1.1", required=true) protected String connectorHttpProtocol
@Parameter(property="maven.tomcat.exec.war.httpPort") protected String httpPort
@Parameter protected String[] excludes
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
protected String findArtifactVersion(org.apache.maven.model.Dependency dependency)
protected boolean sameDependencyWithoutVersion(org.apache.maven.model.Dependency that, org.apache.maven.model.Dependency dependency)
protected void copyDirectoryContentIntoArchive(File sourceFolder, String destinationPath, org.apache.commons.compress.archivers.ArchiveOutputStream archiveOutputStream) throws IOException
IOException
protected File resolvePluginWorkDir() throws org.apache.maven.plugin.MojoExecutionException
buildDirectory
, creating it if it does not exist.org.apache.maven.plugin.MojoExecutionException
- if the plugin work dir cannot be createdprotected File addContextXmlToWar(File contextXmlFile, File warFile) throws IOException, org.apache.commons.compress.archivers.ArchiveException
protected void extractJarToArchive(JarFile file, org.apache.commons.compress.archivers.ArchiveOutputStream os, String[] excludes) throws IOException
file
- The input jar fileos
- The output archiveIOException
Copyright © 2005–2014 The Apache Software Foundation. All rights reserved.