|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.maven.plugin.war.packaging.AbstractWarPackagingTask
public abstract class AbstractWarPackagingTask
Field Summary | |
---|---|
static String |
CLASSES_PATH
|
static String[] |
DEFAULT_INCLUDES
|
static String |
LIB_PATH
|
static String |
META_INF_PATH
|
static String |
WEB_INF_PATH
|
Constructor Summary | |
---|---|
AbstractWarPackagingTask()
|
Method Summary | |
---|---|
protected void |
copyFile(String sourceId,
WarPackagingContext context,
File file,
String targetFilename)
Copy the specified file if the target location has not yet already been used. |
protected boolean |
copyFile(WarPackagingContext context,
File source,
File destination,
String targetFilename,
boolean onlyIfModified)
Copy file from source to destination. |
protected void |
copyFiles(String sourceId,
WarPackagingContext context,
File sourceBaseDir,
PathSet sourceFilesSet,
boolean filtered)
Copies the files if possible as is. |
protected void |
copyFiles(String sourceId,
WarPackagingContext context,
File sourceBaseDir,
PathSet sourceFilesSet,
String targetPrefix,
boolean filtered)
Copies the files if possible with an optional target prefix. |
protected boolean |
copyFilteredFile(String sourceId,
WarPackagingContext context,
File file,
String targetFilename)
Copy the specified file if the target location has not yet already been used and filter its content with the configured filter properties. |
protected void |
doUnpack(WarPackagingContext context,
File file,
File unpackDirectory)
Unpacks the specified file to the specified directory. |
protected String |
getArtifactFinalName(WarPackagingContext context,
Artifact artifact)
Returns the final name of the specified artifact. |
protected String |
getEncoding(File webXml)
Get the encoding from an XML-file. |
protected PathSet |
getFilesToIncludes(File baseDir,
String[] includes,
String[] excludes)
Returns the file to copy. |
protected PathSet |
getFilesToIncludes(File baseDir,
String[] includes,
String[] excludes,
boolean includeDirectories)
Returns the file to copy. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.maven.plugin.war.packaging.WarPackagingTask |
---|
performPackaging |
Field Detail |
---|
public static final String[] DEFAULT_INCLUDES
public static final String WEB_INF_PATH
public static final String META_INF_PATH
public static final String CLASSES_PATH
public static final String LIB_PATH
Constructor Detail |
---|
public AbstractWarPackagingTask()
Method Detail |
---|
protected void copyFiles(String sourceId, WarPackagingContext context, File sourceBaseDir, PathSet sourceFilesSet, String targetPrefix, boolean filtered) throws IOException, MojoExecutionException
sourceId
- the source idcontext
- the context to usesourceBaseDir
- the base directory from which the sourceFilesSet will be copiedsourceFilesSet
- the files to be copiedtargetPrefix
- the prefix to add to the target file name
IOException
- if an error occurred while copying the files
MojoExecutionException
protected void copyFiles(String sourceId, WarPackagingContext context, File sourceBaseDir, PathSet sourceFilesSet, boolean filtered) throws IOException, MojoExecutionException
sourceId
- the source idcontext
- the context to usesourceBaseDir
- the base directory from which the sourceFilesSet will be copiedsourceFilesSet
- the files to be copied
IOException
- if an error occurred while copying the files
MojoExecutionException
protected void copyFile(String sourceId, WarPackagingContext context, File file, String targetFilename) throws IOException
sourceId
- the source idcontext
- the context to usefile
- the file to copytargetFilename
- the relative path according to the root of the webapp
IOException
- if an error occurred while copyingprotected boolean copyFilteredFile(String sourceId, WarPackagingContext context, File file, String targetFilename) throws IOException, MojoExecutionException
sourceId
- the source idcontext
- the context to usefile
- the file to copytargetFilename
- the relative path according to the root of the webapp
IOException
- if an error occurred while copying
MojoExecutionException
- if an error occurred while retrieving the filter propertiesprotected void doUnpack(WarPackagingContext context, File file, File unpackDirectory) throws MojoExecutionException
context
- the packaging contextfile
- the file to unpackunpackDirectory
- the directory to use for th unpacked file
MojoExecutionException
- if an error occurred while unpacking the fileprotected boolean copyFile(WarPackagingContext context, File source, File destination, String targetFilename, boolean onlyIfModified) throws IOException
destination
will be created if they don't already exist. if the onlyIfModified
flag
is false, destination
will be overwritten if it already exists. If the
flag is true destination will be overwritten if it's not up to date.
context
- the packaging contextsource
- an existing non-directory File
to copy bytes fromdestination
- a non-directory File
to write bytes to (possibly overwriting).targetFilename
- the relative path of the file from the webapp root directoryonlyIfModified
- if true, copy the file only if the source has changed, always copy otherwise
IOException
- if source
does not exist, destination
cannot
be written to, or an IO error occurs during copyingprotected String getEncoding(File webXml) throws IOException
webXml
- the XML-file
IOException
- if an error occurred while reading the fileprotected PathSet getFilesToIncludes(File baseDir, String[] includes, String[] excludes)
baseDir
- the base directory to start fromincludes
- the includesexcludes
- the excludes
protected PathSet getFilesToIncludes(File baseDir, String[] includes, String[] excludes, boolean includeDirectories)
baseDir
- the base directory to start fromincludes
- the includesexcludes
- the excludes
protected String getArtifactFinalName(WarPackagingContext context, Artifact artifact) throws InterpolationException
context
- the packaging contextartifact
- the artifact
InterpolationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |