| Modifier and Type | Class and Description |
|---|---|
class |
TrackingArchiver.Addition |
| Modifier and Type | Field and Description |
|---|---|
List<TrackingArchiver.Addition> |
added |
DEFAULT_DIR_MODE, DEFAULT_FILE_MODE, DEFAULT_SYMLILNK_MODE, DUPLICATES_ADD, DUPLICATES_FAIL, DUPLICATES_PRESERVE, DUPLICATES_SKIP, DUPLICATES_VALID_BEHAVIORS, ROLE| Constructor and Description |
|---|
TrackingArchiver() |
| Modifier and Type | Method and Description |
|---|---|
void |
addArchivedFileSet(ArchivedFileSet fileSet)
Adds the given archive file set to the archive.
|
void |
addArchivedFileSet(ArchivedFileSet fileSet,
Charset charset)
Adds the given archive file set to the archive.
|
void |
addArchivedFileSet(File archiveFile)
Obsolete, use
Archiver.addArchivedFileSet(ArchivedFileSet). |
void |
addArchivedFileSet(File archiveFile,
String prefix)
Obsolete, use
Archiver.addArchivedFileSet(ArchivedFileSet). |
void |
addArchivedFileSet(File archiveFile,
String[] includes,
String[] excludes)
Obsolete, use
Archiver.addArchivedFileSet(ArchivedFileSet). |
void |
addArchivedFileSet(File archiveFile,
String prefix,
String[] includes,
String[] excludes)
Obsolete, use
Archiver.addArchivedFileSet(ArchivedFileSet). |
void |
addDirectory(File directory)
Obsolete, use
Archiver.addFileSet(FileSet). |
void |
addDirectory(File directory,
String prefix)
Obsolete, use
Archiver.addFileSet(FileSet). |
void |
addDirectory(File directory,
String[] includes,
String[] excludes)
Obsolete, use
Archiver.addFileSet(FileSet).You can use "inline" of this method in your
IDE to get the proper implementation for this release. |
void |
addDirectory(File directory,
String prefix,
String[] includes,
String[] excludes)
Obsolete, use
Archiver.addFileSet(FileSet). |
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 s,
int i,
String s2) |
void |
addSymlink(String s,
String s2) |
void |
createArchive() |
int |
getDefaultDirectoryMode() |
int |
getDefaultFileMode() |
File |
getDestFile() |
int |
getDirectoryMode()
Gets the forced mode for directories, falling back to default if none is forced.
|
String |
getDuplicateBehavior()
Returns the behavior of this archiver when duplicate files are detected.
|
int |
getFileMode() |
Map<String,ArchiveEntry> |
getFiles() |
boolean |
getIncludeEmptyDirs() |
int |
getOverrideDirectoryMode() |
int |
getOverrideFileMode() |
ResourceIterator |
getResources()
Returns an iterator over instances of
ArchiveEntry, which have previously been added by calls to
Archiver.addResources(PlexusIoResourceCollection), Archiver.addResource(PlexusIoResource, String, int),
Archiver.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() |
void |
setDefaultDirectoryMode(int mode)
This is the "default" value we should use if no other value is specified
|
void |
setDefaultFileMode(int mode) |
void |
setDestFile(File destFile) |
void |
setDirectoryMode(int mode)
This is the forced mode that should be used regardless if set, otherwise falls back to default.
|
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)
to use or not the jvm method for file permissions: user all not active for group permissions
|
public final List<TrackingArchiver.Addition> added
public void createArchive()
throws ArchiverException,
IOException
createArchive in interface ArchiverArchiverExceptionIOExceptionpublic void addDirectory(@Nonnull File directory) throws ArchiverException
ArchiverArchiver.addFileSet(FileSet).
You can use "inline" of this method in your
IDE to get the proper implementation for this release.addDirectory in interface ArchiverArchiverExceptionpublic void addDirectory(@Nonnull File directory, String prefix) throws ArchiverException
ArchiverArchiver.addFileSet(FileSet).
You can use "inline" of this method in your
IDE to get the proper implementation for this release.addDirectory in interface ArchiverArchiverExceptionpublic void addDirectory(@Nonnull File directory, String[] includes, String[] excludes) throws ArchiverException
ArchiverArchiver.addFileSet(FileSet).You can use "inline" of this method in your
IDE to get the proper implementation for this release.addDirectory in interface ArchiverArchiverExceptionpublic void addDirectory(@Nonnull File directory, String prefix, String[] includes, String[] excludes) throws ArchiverException
ArchiverArchiver.addFileSet(FileSet).
You can use "inline" of this method in your
IDE to get the proper implementation for this release.addDirectory in interface ArchiverArchiverExceptionpublic void addFileSet(@Nonnull FileSet fileSet) throws ArchiverException
ArchiverArchiver.addDirectory(File),
Archiver.addDirectory(File, String), Archiver.addDirectory(File, String[], String[]), and
Archiver.addDirectory(File, String, String[], String[]). However, as these methods are in widespread use, they
cannot easily be made deprecated.addFileSet in interface ArchiverArchiverException - Adding the file set failed.public void addFile(@Nonnull File inputFile, @Nonnull String destFileName) throws ArchiverException
addFile in interface ArchiverArchiverExceptionpublic void addFile(@Nonnull File inputFile, @Nonnull String destFileName, int permissions) throws ArchiverException
addFile in interface ArchiverArchiverExceptionpublic void addArchivedFileSet(@Nonnull File archiveFile) throws ArchiverException
ArchiverArchiver.addArchivedFileSet(ArchivedFileSet). You can use "inline" of this method in your
IDE to get the proper implementation for this release.addArchivedFileSet in interface ArchiverArchiverExceptionpublic void addArchivedFileSet(@Nonnull File archiveFile, String prefix) throws ArchiverException
ArchiverArchiver.addArchivedFileSet(ArchivedFileSet). You can use "inline" of this method in your
IDE to get the proper implementation for this release.addArchivedFileSet in interface ArchiverArchiverExceptionpublic void addSymlink(String s, String s2) throws ArchiverException
addSymlink in interface ArchiverArchiverExceptionpublic void addSymlink(String s, int i, String s2) throws ArchiverException
addSymlink in interface ArchiverArchiverExceptionpublic void addArchivedFileSet(File archiveFile, String[] includes, String[] excludes) throws ArchiverException
ArchiverArchiver.addArchivedFileSet(ArchivedFileSet). You can use "inline" of this method in your
IDE to get the proper implementation for this release.addArchivedFileSet in interface ArchiverArchiverExceptionpublic void addArchivedFileSet(@Nonnull File archiveFile, String prefix, String[] includes, String[] excludes) throws ArchiverException
ArchiverArchiver.addArchivedFileSet(ArchivedFileSet). You can use "inline" of this method in your
IDE to get the proper implementation for this release.addArchivedFileSet in interface ArchiverArchiverExceptionpublic void addArchivedFileSet(ArchivedFileSet fileSet) throws ArchiverException
ArchiverArchiver.addArchivedFileSet(File), Archiver.addArchivedFileSet(File, String[], String[]), and
Archiver.addArchivedFileSet(File, String, String[], String[]). However, as these methods are in widespread use,
they cannot easily be made deprecated.
Stream transformers are supported on this methodaddArchivedFileSet in interface ArchiverArchiverExceptionpublic void addArchivedFileSet(ArchivedFileSet fileSet, Charset charset) throws ArchiverException
ArchiverArchiver.addArchivedFileSet(File), Archiver.addArchivedFileSet(File, String[], String[]), and
Archiver.addArchivedFileSet(File, String, String[], String[]). However, as these methods are in widespread use,
they cannot easily be made deprecated.addArchivedFileSet in interface ArchiverfileSet - the fileSet to addcharset - the encoding to use, particularly useful to specific non-standard filename encodings
for some kinds of archives (for instance zip files)
Stream transformers are supported on this methodArchiverExceptionpublic void addResource(org.codehaus.plexus.components.io.resources.PlexusIoResource resource,
String destFileName,
int permissions)
throws ArchiverException
ArchiveraddResource in interface ArchiverArchiverExceptionpublic void addResources(org.codehaus.plexus.components.io.resources.PlexusIoResourceCollection resources)
throws ArchiverException
ArchiveraddResources in interface ArchiverArchiverExceptionpublic File getDestFile()
getDestFile in interface Archiverpublic void setDestFile(File destFile)
setDestFile in interface Archiverpublic void setFileMode(int mode)
setFileMode in interface Archiverpublic int getFileMode()
getFileMode in interface Archiverpublic int getOverrideFileMode()
getOverrideFileMode in interface Archiverpublic void setDefaultFileMode(int mode)
setDefaultFileMode in interface Archiverpublic int getDefaultFileMode()
getDefaultFileMode in interface Archiverpublic void setDirectoryMode(int mode)
ArchiversetDirectoryMode in interface Archiverpublic int getDirectoryMode()
ArchivergetDirectoryMode in interface Archiverpublic int getOverrideDirectoryMode()
getOverrideDirectoryMode in interface Archiverpublic void setDefaultDirectoryMode(int mode)
ArchiversetDefaultDirectoryMode in interface Archiverpublic int getDefaultDirectoryMode()
getDefaultDirectoryMode in interface Archiverpublic boolean getIncludeEmptyDirs()
getIncludeEmptyDirs in interface Archiverpublic void setIncludeEmptyDirs(boolean includeEmptyDirs)
setIncludeEmptyDirs in interface Archiverpublic void setDotFileDirectory(File dotFileDirectory)
setDotFileDirectory in interface Archiver@Nonnull public ResourceIterator getResources() throws ArchiverException
ArchiverArchiveEntry, which have previously been added by calls to
Archiver.addResources(PlexusIoResourceCollection), Archiver.addResource(PlexusIoResource, String, int),
Archiver.addFileSet(FileSet), etc.getResources in interface ArchiverArchiverExceptionpublic Map<String,ArchiveEntry> getFiles()
public boolean isForced()
ArchiverReturns, 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 ArchiverArchiver.setForced(boolean),
Archiver.isSupportingForced()public void setForced(boolean forced)
ArchiverSets, 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 Archiverforced - True, if the target archive should always be created; false otherwiseArchiver.isForced(),
Archiver.isSupportingForced()public boolean isSupportingForced()
ArchiverArchiver.setForced(boolean) to true.isSupportingForced in interface ArchiverArchiver.setForced(boolean),
Archiver.isForced()public String getDuplicateBehavior()
ArchivergetDuplicateBehavior in interface Archiverpublic void setDuplicateBehavior(String duplicate)
ArchiverArchiverExceptionArchiver.DUPLICATES_ADD, Archiver.DUPLICATES_SKIP, Archiver.DUPLICATES_PRESERVE,
Archiver.DUPLICATES_FAIL.setDuplicateBehavior in interface Archiverpublic boolean isUseJvmChmod()
isUseJvmChmod in interface Archiverpublic void setUseJvmChmod(boolean useJvmChmod)
ArchiversetUseJvmChmod in interface Archiverpublic boolean isIgnorePermissions()
isIgnorePermissions in interface Archiverpublic void setIgnorePermissions(boolean ignorePermissions)
setIgnorePermissions in interface ArchiverCopyright © 2001–2019 Codehaus Plexus. All rights reserved.