org.codehaus.plexus.archiver

Interface Archiver

public interface Archiver

Version: $Revision: 3651 $ $Date: 2006-08-21 17:05:02 -0400 (Mon, 21 Aug 2006) $

Field Summary
StringROLE
Method Summary
voidaddArchivedFileSet(File archiveFile)
voidaddArchivedFileSet(File archiveFile, String prefix)
voidaddArchivedFileSet(File archiveFile, String[] includes, String[] excludes)
voidaddArchivedFileSet(File archiveFile, String prefix, String[] includes, String[] excludes)
voidaddDirectory(File directory)
voidaddDirectory(File directory, String prefix)
voidaddDirectory(File directory, String[] includes, String[] excludes)
voidaddDirectory(File directory, String prefix, String[] includes, String[] excludes)
voidaddFile(File inputFile, String destFileName)
voidaddFile(File inputFile, String destFileName, int permissions)
voidcreateArchive()
intgetDefaultDirectoryMode()
intgetDefaultFileMode()
FilegetDestFile()
MapgetFiles()
booleangetIncludeEmptyDirs()
booleanisForced()

Returns, whether recreating the archive is forced (default).

booleanisSupportingForced()
Returns, whether the archive supports uptodate checks.
voidsetDefaultDirectoryMode(int mode)
voidsetDefaultFileMode(int mode)
voidsetDestFile(File destFile)
voidsetForced(boolean forced)

Sets, whether recreating the archive is forced (default).

voidsetIncludeEmptyDirs(boolean includeEmptyDirs)

Field Detail

ROLE

public String ROLE

Method Detail

addArchivedFileSet

public void addArchivedFileSet(File archiveFile)

addArchivedFileSet

public void addArchivedFileSet(File archiveFile, String prefix)

addArchivedFileSet

public void addArchivedFileSet(File archiveFile, String[] includes, String[] excludes)

addArchivedFileSet

public void addArchivedFileSet(File archiveFile, String prefix, String[] includes, String[] excludes)

addDirectory

public void addDirectory(File directory)

addDirectory

public void addDirectory(File directory, String prefix)

addDirectory

public void addDirectory(File directory, String[] includes, String[] excludes)

addDirectory

public void addDirectory(File directory, String prefix, String[] includes, String[] excludes)

addFile

public void addFile(File inputFile, String destFileName)

addFile

public void addFile(File inputFile, String destFileName, int permissions)

createArchive

public void createArchive()

getDefaultDirectoryMode

public int getDefaultDirectoryMode()

getDefaultFileMode

public int getDefaultFileMode()

getDestFile

public File getDestFile()

getFiles

public Map getFiles()

getIncludeEmptyDirs

public boolean getIncludeEmptyDirs()

isForced

public 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.

Returns: True, if the target archive should always be created; false otherwise

See Also: Archiver isSupportingForced

isSupportingForced

public boolean isSupportingForced()
Returns, whether the archive supports uptodate checks. If so, you may set Archiver to true.

Returns: True, if the archiver does support uptodate checks, false otherwise

See Also: Archiver isForced

setDefaultDirectoryMode

public void setDefaultDirectoryMode(int mode)

setDefaultFileMode

public void setDefaultFileMode(int mode)

setDestFile

public void setDestFile(File destFile)

setForced

public 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.

Parameters: forced True, if the target archive should always be created; false otherwise

See Also: isForced isSupportingForced

setIncludeEmptyDirs

public void setIncludeEmptyDirs(boolean includeEmptyDirs)