|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.alfresco.maven.plugin.amp.packaging.AbstractAmpPackagingTask
public abstract class AbstractAmpPackagingTask
Field Summary | |
---|---|
static String[] |
DEFAULT_INCLUDES
|
static String |
META_INF_PATH
|
Constructor Summary | |
---|---|
AbstractAmpPackagingTask()
|
Method Summary | |
---|---|
protected boolean |
copyFile(AmpPackagingContext context,
File source,
File destination,
String targetFilename,
boolean onlyIfModified)
Copy file from source to destination. |
protected void |
copyFile(String sourceId,
AmpPackagingContext context,
File file,
String targetFilename)
Copy the specified file if the target location has not yet already been used. |
protected void |
copyFiles(String sourceId,
AmpPackagingContext context,
File sourceBaseDir,
PathSet sourceFilesSet)
Copies the files if possible as is. |
protected void |
copyFiles(String sourceId,
AmpPackagingContext context,
File sourceBaseDir,
PathSet sourceFilesSet,
String targetPrefix)
Copies the files if possible with an optional target prefix. |
protected boolean |
copyFilteredFile(String sourceId,
AmpPackagingContext 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 configureed filter properties. |
protected void |
doUnpack(AmpPackagingContext context,
File file,
File unpackDirectory)
Unpacks the specified file to the specified directory. |
protected String |
getArtifactFinalName(AmpPackagingContext context,
org.apache.maven.artifact.Artifact artifact)
Returns the final name of the specified artifact. |
protected PathSet |
getFilesToIncludes(File baseDir,
String[] includes,
String[] excludes)
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.alfresco.maven.plugin.amp.packaging.AmpPackagingTask |
---|
performPackaging |
Field Detail |
---|
public static final String[] DEFAULT_INCLUDES
public static final String META_INF_PATH
Constructor Detail |
---|
public AbstractAmpPackagingTask()
Method Detail |
---|
protected void copyFiles(String sourceId, AmpPackagingContext context, File sourceBaseDir, PathSet sourceFilesSet, String targetPrefix) throws IOException
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 occured while copying the filesprotected void copyFiles(String sourceId, AmpPackagingContext context, File sourceBaseDir, PathSet sourceFilesSet) throws IOException
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 occured while copying the filesprotected void copyFile(String sourceId, AmpPackagingContext 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 occured while copyingprotected boolean copyFilteredFile(String sourceId, AmpPackagingContext context, File file, String targetFilename) throws IOException, org.apache.maven.plugin.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 occured while copying
org.apache.maven.plugin.MojoExecutionException
- if an error occured while retrieving the filter propertiesprotected void doUnpack(AmpPackagingContext context, File file, File unpackDirectory) throws org.apache.maven.plugin.MojoExecutionException
context
- the packaging contextfile
- the file to unpackunpackDirectory
- the directory to use for th unpacked file
org.apache.maven.plugin.MojoExecutionException
- if an error occured while unpacking the fileprotected boolean copyFile(AmpPackagingContext 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 PathSet getFilesToIncludes(File baseDir, String[] includes, String[] excludes)
baseDir
- the base directory to start fromincludes
- the includesexcludes
- the excludes
protected String getArtifactFinalName(AmpPackagingContext context, org.apache.maven.artifact.Artifact artifact)
context
- the packaging contextartifact
- the artifact
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |