org.codehaus.plexus.archiver
public interface Archiver
Version: $Revision: 8217 $ $Date: 2009-05-27 03:56:55 +0300 (Wed, 27 May 2009) $
Field Summary | |
---|---|
int | DEFAULT_DIR_MODE
Default value for the dirmode attribute. |
int | DEFAULT_FILE_MODE
Default value for the filemode attribute. |
static String | DUPLICATES_ADD |
static String | DUPLICATES_FAIL |
static String | DUPLICATES_PRESERVE |
static String | DUPLICATES_SKIP |
static Set | DUPLICATES_VALID_BEHAVIORS |
String | ROLE |
Method Summary | |
---|---|
void | addArchivedFileSet(File archiveFile) |
void | addArchivedFileSet(File archiveFile, String prefix) |
void | addArchivedFileSet(File archiveFile, String[] includes, String[] excludes) |
void | addArchivedFileSet(File archiveFile, String prefix, String[] includes, String[] excludes) |
void | addArchivedFileSet(ArchivedFileSet fileSet)
Adds the given archive file set to the archive.
|
void | addDirectory(File directory)
Obsolete, use addFileSet. |
void | addDirectory(File directory, String prefix)
Obsolete, use addFileSet. |
void | addDirectory(File directory, String[] includes, String[] excludes)
Obsolete, use addFileSet. |
void | addDirectory(File directory, String prefix, String[] includes, String[] excludes)
Obsolete, use addFileSet. |
void | addFile(File inputFile, String destFileName) |
void | addFile(File inputFile, String destFileName, int permissions) |
void | addFileSet(FileSet fileSet)
Adds the given file set to the archive.
|
void | addResource(PlexusIoResource resource, String destFileName, int permissions)
Adds the given resource collection to the archive. |
void | addResources(PlexusIoResourceCollection resources)
Adds the given resource collection to the archive. |
void | createArchive() |
int | getDefaultDirectoryMode() |
int | getDefaultFileMode() |
File | getDestFile() |
int | getDirectoryMode() |
String | getDuplicateBehavior()
Returns the behavior of this archiver when duplicate files are detected. |
int | getFileMode() |
Map | getFiles() |
boolean | getIncludeEmptyDirs() |
int | getOverrideDirectoryMode() |
int | getOverrideFileMode() |
ResourceIterator | getResources()
Returns an iterator over instances of ArchiveEntry,
which have previously been added by calls to
addResources,
Archiver,
addFileSet, etc. |
boolean | isForced() Returns, whether recreating the archive is forced (default). |
boolean | isSupportingForced()
Returns, whether the archive supports uptodate checks. |
void | setDefaultDirectoryMode(int mode) |
void | setDefaultFileMode(int mode) |
void | setDestFile(File destFile) |
void | setDirectoryMode(int mode) |
void | setDotFileDirectory(File dotFileDirectory) |
void | setDuplicateBehavior(String duplicate)
Set the behavior of this archiver when duplicate files are detected. |
void | setFileMode(int mode) |
void | setForced(boolean forced) Sets, whether recreating the archive is forced (default). |
void | setIncludeEmptyDirs(boolean includeEmptyDirs) |
(File, String[], String[])
, and
(File, String, String[], String[])
.
However, as these methods are in widespread use, they cannot easily
be made deprecated.Since: 1.0-alpha-9
(File, String[], String[])
,
and (File, String, String[], String[])
. However, as these
methods are in widespread use, they cannot easily be made deprecated.Throws: ArchiverException Adding the file set failed.
Since: 1.0-alpha-9
Since: 1.0-alpha-10
Since: 1.0-alpha-10
Deprecated: Use getResources
Since: 1.0-alpha-10
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 isSupportingForced may be called to check whether an archiver does support uptodate checks.
Returns: True, if the target archive should always be created; false otherwise
See Also: Archiver isSupportingForced
Returns: True, if the archiver does support uptodate checks, false otherwise
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 isSupportingForced may be called to check whether an archiver does support uptodate checks.
Parameters: forced True, if the target archive should always be created; false otherwise
See Also: isForced isSupportingForced