public interface Archiver
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_DIR_MODE
Default value for the dirmode attribute.
|
static int |
DEFAULT_FILE_MODE
Default value for the filemode attribute.
|
static int |
DEFAULT_SYMLILNK_MODE
Default value for the symlinkmode attribute.
|
static String |
DUPLICATES_ADD |
static String |
DUPLICATES_FAIL |
static String |
DUPLICATES_PRESERVE |
static String |
DUPLICATES_SKIP |
static Set |
DUPLICATES_VALID_BEHAVIORS |
static String |
ROLE |
Modifier and Type | Method and Description |
---|---|
void |
addArchivedFileSet(ArchivedFileSet fileSet)
Adds the given archive file set to the archive.
|
void |
addArchivedFileSet(File archiveFile)
Deprecated.
Will go away in next major version
|
void |
addArchivedFileSet(File archiveFile,
String prefix)
Deprecated.
Will go away in next major version
|
void |
addArchivedFileSet(File archiveFile,
String[] includes,
String[] excludes)
Deprecated.
Will go away in next major version
|
void |
addArchivedFileSet(File archiveFile,
String prefix,
String[] includes,
String[] excludes)
Deprecated.
Will go away in next major version
|
void |
addDirectory(File directory)
Deprecated.
Will go away in next major version
|
void |
addDirectory(File directory,
String prefix)
Deprecated.
Will go away in next major version
|
void |
addDirectory(File directory,
String[] includes,
String[] excludes)
Deprecated.
Will go away in next major version
|
void |
addDirectory(File directory,
String prefix,
String[] includes,
String[] excludes)
Deprecated.
Will go away in next major version
|
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(org.codehaus.plexus.components.io.resources.PlexusIoResource resource,
String destFileName,
int permissions)
Adds the given resource collection to the archive.
|
void |
addResources(org.codehaus.plexus.components.io.resources.PlexusIoResourceCollection resources)
Adds the given resource collection to the archive.
|
void |
addSymlink(String symlinkName,
int permissions,
String symlinkDestination) |
void |
addSymlink(String symlinkName,
String symlinkDestination) |
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<String,ArchiveEntry> |
getFiles()
Deprecated.
Use
getResources() |
boolean |
getIncludeEmptyDirs() |
int |
getOverrideDirectoryMode() |
int |
getOverrideFileMode() |
ResourceIterator |
getResources()
Returns an iterator over instances of
ArchiveEntry , which have previously been added by calls to
addResources(PlexusIoResourceCollection) , addResource(PlexusIoResource, String, int) ,
addFileSet(FileSet) , etc. |
boolean |
isForced()
Returns, whether recreating the archive is forced (default).
|
boolean |
isIgnorePermissions() |
boolean |
isSupportingForced()
Returns, whether the archive supports uptodate checks.
|
boolean |
isUseJvmChmod()
For java7 and above, new java method will be used, regardless of this setting
|
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 |
setIgnorePermissions(boolean ignorePermissions) |
void |
setIncludeEmptyDirs(boolean includeEmptyDirs) |
void |
setUseJvmChmod(boolean useJvmChmod)
For java7 and above, new java method will be used, regardless of this setting
to use or not the jvm method for file permissions : user all not active for group permissions
|
static final int DEFAULT_DIR_MODE
static final int DEFAULT_FILE_MODE
static final int DEFAULT_SYMLILNK_MODE
static final String ROLE
static final String DUPLICATES_ADD
static final String DUPLICATES_PRESERVE
static final String DUPLICATES_SKIP
static final String DUPLICATES_FAIL
static final Set DUPLICATES_VALID_BEHAVIORS
void createArchive() throws ArchiverException, IOException
ArchiverException
IOException
@Deprecated void addDirectory(File directory) throws ArchiverException
addFileSet(FileSet)
.
You can use "inline" of this method in your
IDE to get the proper implementation for this release.ArchiverException
@Deprecated void addDirectory(File directory, String prefix) throws ArchiverException
addFileSet(FileSet)
.
You can use "inline" of this method in your
IDE to get the proper implementation for this release.ArchiverException
@Deprecated void addDirectory(File directory, String[] includes, String[] excludes) throws ArchiverException
addFileSet(FileSet)
.You can use "inline" of this method in your
IDE to get the proper implementation for this release.ArchiverException
@Deprecated void addDirectory(File directory, String prefix, String[] includes, String[] excludes) throws ArchiverException
addFileSet(FileSet)
.
You can use "inline" of this method in your
IDE to get the proper implementation for this release.ArchiverException
void addFileSet(FileSet fileSet) throws ArchiverException
addDirectory(File)
,
addDirectory(File, String)
, addDirectory(File, String[], String[])
, and
addDirectory(File, String, String[], String[])
. However, as these methods are in widespread use, they
cannot easily be made deprecated.ArchiverException
- Adding the file set failed.void addSymlink(String symlinkName, String symlinkDestination) throws ArchiverException
ArchiverException
void addSymlink(String symlinkName, int permissions, String symlinkDestination) throws ArchiverException
ArchiverException
void addFile(File inputFile, String destFileName) throws ArchiverException
ArchiverException
void addFile(File inputFile, String destFileName, int permissions) throws ArchiverException
ArchiverException
void addArchivedFileSet(File archiveFile) throws ArchiverException
addArchivedFileSet(ArchivedFileSet)
. You can use "inline" of this method in your
IDE to get the proper implementation for this release.ArchiverException
@Deprecated void addArchivedFileSet(File archiveFile, String prefix) throws ArchiverException
addArchivedFileSet(ArchivedFileSet)
. You can use "inline" of this method in your
IDE to get the proper implementation for this release.ArchiverException
void addArchivedFileSet(File archiveFile, String[] includes, String[] excludes) throws ArchiverException
addArchivedFileSet(ArchivedFileSet)
. You can use "inline" of this method in your
IDE to get the proper implementation for this release.ArchiverException
void addArchivedFileSet(File archiveFile, String prefix, String[] includes, String[] excludes) throws ArchiverException
addArchivedFileSet(ArchivedFileSet)
. You can use "inline" of this method in your
IDE to get the proper implementation for this release.ArchiverException
void addArchivedFileSet(ArchivedFileSet fileSet) throws ArchiverException
addArchivedFileSet(File)
, addArchivedFileSet(File, String[], String[])
, and
addArchivedFileSet(File, String, String[], String[])
. However, as these methods are in widespread use,
they cannot easily be made deprecated.ArchiverException
void addResource(org.codehaus.plexus.components.io.resources.PlexusIoResource resource, String destFileName, int permissions) throws ArchiverException
ArchiverException
void addResources(org.codehaus.plexus.components.io.resources.PlexusIoResourceCollection resources) throws ArchiverException
ArchiverException
File getDestFile()
void setDestFile(File destFile)
void setFileMode(int mode)
int getFileMode()
int getOverrideFileMode()
void setDefaultFileMode(int mode)
int getDefaultFileMode()
void setDirectoryMode(int mode)
int getDirectoryMode()
int getOverrideDirectoryMode()
void setDefaultDirectoryMode(int mode)
int getDefaultDirectoryMode()
boolean getIncludeEmptyDirs()
void setIncludeEmptyDirs(boolean includeEmptyDirs)
void setDotFileDirectory(File dotFileDirectory)
ResourceIterator getResources() throws ArchiverException
ArchiveEntry
, which have previously been added by calls to
addResources(PlexusIoResourceCollection)
, addResource(PlexusIoResource, String, int)
,
addFileSet(FileSet)
, etc.ArchiverException
Map<String,ArchiveEntry> getFiles()
getResources()
boolean isForced()
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.
setForced(boolean)
,
isSupportingForced()
void setForced(boolean forced)
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.
forced
- True, if the target archive should always be created; false otherwiseisForced()
,
isSupportingForced()
boolean isSupportingForced()
setForced(boolean)
to true.setForced(boolean)
,
isForced()
String getDuplicateBehavior()
void setDuplicateBehavior(String duplicate)
ArchiverException
DUPLICATES_ADD
, DUPLICATES_SKIP
, DUPLICATES_PRESERVE
,
DUPLICATES_FAIL
.void setUseJvmChmod(boolean useJvmChmod)
useJvmChmod
- boolean isUseJvmChmod()
boolean isIgnorePermissions()
void setIgnorePermissions(boolean ignorePermissions)
Copyright © 2001-2014 Codehaus. All Rights Reserved.