org.apache.maven.plugin.war
Class WarMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.maven.plugin.war.AbstractWarMojo
          extended by org.apache.maven.plugin.war.WarMojo
All Implemented Interfaces:
ContextEnabled, Mojo

@Mojo(name="war",
      defaultPhase=PACKAGE,
      threadSafe=true,
      requiresDependencyResolution=RUNTIME)
public class WarMojo
extends AbstractWarMojo

Build a WAR file.

Version:
$Id: WarMojo.html 868453 2013-07-05 11:25:41Z olamy $
Author:
Emmanuel Venisse

Field Summary
 
Fields inherited from class org.apache.maven.plugin.war.AbstractWarMojo
DEFAULT_FILE_NAME_MAPPING, DEFAULT_FILE_NAME_MAPPING_CLASSIFIER, escapeString
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
WarMojo()
           
 
Method Summary
 void execute()
          Executes the WarMojo on the current project.
 String getClassesClassifier()
           
 String getClassifier()
           
 String getOutputDirectory()
           
 String[] getPackagingExcludes()
           
 String[] getPackagingIncludes()
           
 MavenProjectHelper getProjectHelper()
           
protected  File getTargetClassesFile()
           
protected static File getTargetFile(File basedir, String finalName, String classifier, String type)
           
protected  File getTargetWarFile()
           
 WarArchiver getWarArchiver()
           
 String getWarName()
           
 boolean isAttachClasses()
           
 boolean isFailOnMissingWebXml()
           
 boolean isPrimaryArtifact()
           
 void setAttachClasses(boolean attachClasses)
           
 void setClassesClassifier(String classesClassifier)
           
 void setClassifier(String classifier)
           
 void setFailOnMissingWebXml(boolean failOnMissingWebXml)
           
 void setOutputDirectory(String outputDirectory)
           
 void setPackagingExcludes(String packagingExcludes)
           
 void setPackagingIncludes(String packagingIncludes)
           
 void setPrimaryArtifact(boolean primaryArtifact)
           
 void setProjectHelper(MavenProjectHelper projectHelper)
           
 void setWarArchiver(WarArchiver warArchiver)
           
 void setWarName(String warName)
           
 
Methods inherited from class org.apache.maven.plugin.war.AbstractWarMojo
addOverlay, buildExplodedWebapp, buildWebapp, getArchive, getArtifactFactory, getCacheFile, getClassesDirectory, getContainerConfigXML, getCurrentProjectOverlay, getDependentWarExcludes, getDependentWarIncludes, getExcludes, getFilters, getIncludes, getJarArchiver, getNonFilteredFileExtensions, getOutputFileNameMapping, getOverlays, getProject, getSession, getWarSourceDirectory, getWarSourceExcludes, getWarSourceIncludes, getWebappDirectory, getWebResources, getWebXml, getWorkDirectory, isArchiveClasses, isIncludeEmptyDirectories, isRecompressZippedFiles, isUseCache, setArchiveClasses, setArtifactFactory, setCacheFile, setClassesDirectory, setContainerConfigXML, setFilters, setJarArchiver, setNonFilteredFileExtensions, setOutputFileNameMapping, setOverlays, setProject, setUseCache, setWarSourceDirectory, setWarSourceExcludes, setWarSourceIncludes, setWebappDirectory, setWebResources, setWebXml, setWorkDirectory
 
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
 

Constructor Detail

WarMojo

public WarMojo()
Method Detail

execute

public void execute()
             throws MojoExecutionException,
                    MojoFailureException
Executes the WarMojo on the current project.

Throws:
MojoExecutionException - if an error occurred while building the webapp
MojoFailureException

getTargetFile

protected static File getTargetFile(File basedir,
                                    String finalName,
                                    String classifier,
                                    String type)

getTargetWarFile

protected File getTargetWarFile()

getTargetClassesFile

protected File getTargetClassesFile()

getClassifier

public String getClassifier()

setClassifier

public void setClassifier(String classifier)

getPackagingExcludes

public String[] getPackagingExcludes()

setPackagingExcludes

public void setPackagingExcludes(String packagingExcludes)

getPackagingIncludes

public String[] getPackagingIncludes()

setPackagingIncludes

public void setPackagingIncludes(String packagingIncludes)

getOutputDirectory

public String getOutputDirectory()

setOutputDirectory

public void setOutputDirectory(String outputDirectory)

getWarName

public String getWarName()

setWarName

public void setWarName(String warName)

getWarArchiver

public WarArchiver getWarArchiver()

setWarArchiver

public void setWarArchiver(WarArchiver warArchiver)

getProjectHelper

public MavenProjectHelper getProjectHelper()

setProjectHelper

public void setProjectHelper(MavenProjectHelper projectHelper)

isPrimaryArtifact

public boolean isPrimaryArtifact()

setPrimaryArtifact

public void setPrimaryArtifact(boolean primaryArtifact)

isAttachClasses

public boolean isAttachClasses()

setAttachClasses

public void setAttachClasses(boolean attachClasses)

getClassesClassifier

public String getClassesClassifier()

setClassesClassifier

public void setClassesClassifier(String classesClassifier)

isFailOnMissingWebXml

public boolean isFailOnMissingWebXml()

setFailOnMissingWebXml

public void setFailOnMissingWebXml(boolean failOnMissingWebXml)


Copyright © 2002–2013 The Apache Software Foundation. All rights reserved.