|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.plexus.logging.AbstractLogEnabled
org.codehaus.plexus.archiver.AbstractArchiver
public abstract class AbstractArchiver
Field Summary | |
---|---|
static int |
DEFAULT_DIR_MODE
Default value for the dirmode attribute. |
static int |
DEFAULT_FILE_MODE
Default value for the filemode attribute. |
Fields inherited from interface org.codehaus.plexus.archiver.Archiver |
---|
ROLE |
Constructor Summary | |
---|---|
AbstractArchiver()
|
Method Summary | |
---|---|
void |
addArchivedFileSet(java.io.File archiveFile)
|
void |
addArchivedFileSet(java.io.File archiveFile,
java.lang.String prefix)
|
void |
addArchivedFileSet(java.io.File archiveFile,
java.lang.String[] includes,
java.lang.String[] excludes)
|
void |
addArchivedFileSet(java.io.File archiveFile,
java.lang.String prefix,
java.lang.String[] includes,
java.lang.String[] excludes)
|
void |
addArchiveFinalizer(ArchiveFinalizer finalizer)
|
void |
addDirectory(java.io.File directory)
|
void |
addDirectory(java.io.File directory,
java.lang.String prefix)
|
void |
addDirectory(java.io.File directory,
java.lang.String[] includes,
java.lang.String[] excludes)
|
void |
addDirectory(java.io.File directory,
java.lang.String prefix,
java.lang.String[] includes,
java.lang.String[] excludes)
|
void |
addFile(java.io.File inputFile,
java.lang.String destFileName)
|
void |
addFile(java.io.File inputFile,
java.lang.String destFileName,
int permissions)
|
protected boolean |
checkForced()
|
protected abstract void |
cleanUp()
|
protected abstract void |
close()
|
void |
contextualize(org.codehaus.plexus.context.Context context)
Allows us to pull the ArchiverManager instance out of the container without causing a chicken-and-egg instantiation/composition problem. |
void |
createArchive()
|
protected abstract void |
execute()
|
protected java.util.List |
getArchiveFinalizers()
|
protected abstract java.lang.String |
getArchiveType()
|
int |
getDefaultDirectoryMode()
|
int |
getDefaultFileMode()
|
java.io.File |
getDestFile()
|
java.util.Map |
getDirs()
|
java.util.Map |
getFiles()
|
boolean |
getIncludeEmptyDirs()
|
protected org.codehaus.plexus.logging.Logger |
getLogger()
|
protected boolean |
hasVirtualFiles()
|
boolean |
isForced()
Returns, whether recreating the archive is forced (default). |
boolean |
isSupportingForced()
Returns, whether the archive supports uptodate checks. |
protected boolean |
isUptodate()
|
protected boolean |
revert(java.lang.StringBuffer messageBuffer)
|
protected void |
runArchiveFinalizers()
|
void |
setArchiveFilters(java.util.List filters)
|
void |
setArchiveFinalizers(java.util.List archiveFinalizers)
|
void |
setDefaultDirectoryMode(int mode)
|
void |
setDefaultFileMode(int mode)
|
void |
setDestFile(java.io.File destFile)
|
void |
setDotFileDirectory(java.io.File dotFileDirectory)
|
void |
setForced(boolean forced)
Sets, whether recreating the archive is forced (default). |
void |
setIncludeEmptyDirs(boolean includeEmptyDirs)
|
protected void |
validate()
|
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled |
---|
enableLogging, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_DIR_MODE
public static final int DEFAULT_FILE_MODE
Constructor Detail |
---|
public AbstractArchiver()
Method Detail |
---|
public void setDefaultFileMode(int mode)
setDefaultFileMode
in interface Archiver
public int getDefaultFileMode()
getDefaultFileMode
in interface Archiver
public void setDefaultDirectoryMode(int mode)
setDefaultDirectoryMode
in interface Archiver
public int getDefaultDirectoryMode()
getDefaultDirectoryMode
in interface Archiver
public boolean getIncludeEmptyDirs()
getIncludeEmptyDirs
in interface Archiver
public void setIncludeEmptyDirs(boolean includeEmptyDirs)
setIncludeEmptyDirs
in interface Archiver
public void addDirectory(java.io.File directory) throws ArchiverException
addDirectory
in interface Archiver
ArchiverException
public void addDirectory(java.io.File directory, java.lang.String prefix) throws ArchiverException
addDirectory
in interface Archiver
ArchiverException
public void addDirectory(java.io.File directory, java.lang.String[] includes, java.lang.String[] excludes) throws ArchiverException
addDirectory
in interface Archiver
ArchiverException
public void addDirectory(java.io.File directory, java.lang.String prefix, java.lang.String[] includes, java.lang.String[] excludes) throws ArchiverException
addDirectory
in interface Archiver
ArchiverException
public void addFile(java.io.File inputFile, java.lang.String destFileName) throws ArchiverException
addFile
in interface Archiver
ArchiverException
public void addFile(java.io.File inputFile, java.lang.String destFileName, int permissions) throws ArchiverException
addFile
in interface Archiver
ArchiverException
public java.util.Map getFiles()
getFiles
in interface Archiver
public java.io.File getDestFile()
getDestFile
in interface Archiver
public void setDestFile(java.io.File destFile)
setDestFile
in interface Archiver
protected org.codehaus.plexus.logging.Logger getLogger()
getLogger
in class org.codehaus.plexus.logging.AbstractLogEnabled
public java.util.Map getDirs()
public void addArchivedFileSet(java.io.File archiveFile, java.lang.String prefix, java.lang.String[] includes, java.lang.String[] excludes) throws ArchiverException
addArchivedFileSet
in interface Archiver
ArchiverException
public void addArchivedFileSet(java.io.File archiveFile, java.lang.String prefix) throws ArchiverException
addArchivedFileSet
in interface Archiver
ArchiverException
public void addArchivedFileSet(java.io.File archiveFile, java.lang.String[] includes, java.lang.String[] excludes) throws ArchiverException
addArchivedFileSet
in interface Archiver
ArchiverException
public void addArchivedFileSet(java.io.File archiveFile) throws ArchiverException
addArchivedFileSet
in interface Archiver
ArchiverException
public void contextualize(org.codehaus.plexus.context.Context context) throws org.codehaus.plexus.context.ContextException
contextualize
in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
org.codehaus.plexus.context.ContextException
public boolean isForced()
Archiver
Returns, whether recreating the archive is forced (default). Setting this option to false means, that the archiver should compare the timestamps of included files with the timestamp of the target archive and rebuild the archive only, if the latter timestamp precedes the former timestamps. Checking for timestamps will typically offer a performance gain (in particular, if the following steps in a build can be suppressed, if an archive isn't recrated) on the cost that you get inaccurate results from time to time. In particular, removal of source files won't be detected.
An archiver doesn't necessarily support checks for uptodate. If
so, setting this option to true will simply be ignored. The method
Archiver.isSupportingForced()
may be called to check whether an
archiver does support uptodate checks.
isForced
in interface Archiver
Archiver.setForced(boolean)
,
Archiver.isSupportingForced()
public void setForced(boolean forced)
Archiver
Sets, whether recreating the archive is forced (default). Setting this option to false means, that the archiver should compare the timestamps of included files with the timestamp of the target archive and rebuild the archive only, if the latter timestamp precedes the former timestamps. Checking for timestamps will typically offer a performance gain (in particular, if the following steps in a build can be suppressed, if an archive isn't recrated) on the cost that you get inaccurate results from time to time. In particular, removal of source files won't be detected.
An archiver doesn't necessarily support checks for uptodate. If
so, setting this option to true will simply be ignored. The method
Archiver.isSupportingForced()
may be called to check whether an
archiver does support uptodate checks.
setForced
in interface Archiver
forced
- True, if the target archive should always be created; false
otherwiseArchiver.isForced()
,
Archiver.isSupportingForced()
public void setArchiveFilters(java.util.List filters)
setArchiveFilters
in interface FilterEnabled
public void addArchiveFinalizer(ArchiveFinalizer finalizer)
addArchiveFinalizer
in interface FinalizerEnabled
public void setArchiveFinalizers(java.util.List archiveFinalizers)
setArchiveFinalizers
in interface FinalizerEnabled
public void setDotFileDirectory(java.io.File dotFileDirectory)
setDotFileDirectory
in interface Archiver
protected boolean isUptodate()
protected boolean checkForced()
public boolean isSupportingForced()
Archiver
Archiver.setForced(boolean)
to true.
isSupportingForced
in interface Archiver
Archiver.setForced(boolean)
,
Archiver.isForced()
protected java.util.List getArchiveFinalizers()
protected void runArchiveFinalizers() throws ArchiverException
ArchiverException
public final void createArchive() throws ArchiverException, java.io.IOException
createArchive
in interface Archiver
ArchiverException
java.io.IOException
protected boolean hasVirtualFiles()
protected boolean revert(java.lang.StringBuffer messageBuffer)
protected void validate() throws ArchiverException, java.io.IOException
ArchiverException
java.io.IOException
protected abstract java.lang.String getArchiveType()
protected abstract void close() throws java.io.IOException
java.io.IOException
protected abstract void cleanUp()
protected abstract void execute() throws ArchiverException, java.io.IOException
ArchiverException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |