org.codehaus.plexus.archiver
Interface Archiver

All Known Implementing Classes:
AbstractArchiver, AbstractZipArchiver, BZip2Archiver, DirectoryArchiver, EarArchiver, GZipArchiver, JarArchiver, TarArchiver, WarArchiver, ZipArchiver

public interface Archiver

Version:
$Revision: 4897 $ $Date: 2006-11-29 03:58:25 +0000 (Wed, 29 Nov 2006) $

Field Summary
static java.lang.String ROLE
           
 
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 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)
           
 void createArchive()
           
 int getDefaultDirectoryMode()
           
 int getDefaultFileMode()
           
 java.io.File getDestFile()
           
 java.util.Map getFiles()
           
 boolean getIncludeEmptyDirs()
           
 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(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)
           
 

Field Detail

ROLE

static final java.lang.String ROLE
Method Detail

createArchive

void createArchive()
                   throws ArchiverException,
                          java.io.IOException
Throws:
ArchiverException
java.io.IOException

addDirectory

void addDirectory(java.io.File directory)
                  throws ArchiverException
Throws:
ArchiverException

addDirectory

void addDirectory(java.io.File directory,
                  java.lang.String prefix)
                  throws ArchiverException
Throws:
ArchiverException

addDirectory

void addDirectory(java.io.File directory,
                  java.lang.String[] includes,
                  java.lang.String[] excludes)
                  throws ArchiverException
Throws:
ArchiverException

addDirectory

void addDirectory(java.io.File directory,
                  java.lang.String prefix,
                  java.lang.String[] includes,
                  java.lang.String[] excludes)
                  throws ArchiverException
Throws:
ArchiverException

addFile

void addFile(java.io.File inputFile,
             java.lang.String destFileName)
             throws ArchiverException
Throws:
ArchiverException

addFile

void addFile(java.io.File inputFile,
             java.lang.String destFileName,
             int permissions)
             throws ArchiverException
Throws:
ArchiverException

addArchivedFileSet

void addArchivedFileSet(java.io.File archiveFile)
                        throws ArchiverException
Throws:
ArchiverException

addArchivedFileSet

void addArchivedFileSet(java.io.File archiveFile,
                        java.lang.String prefix)
                        throws ArchiverException
Throws:
ArchiverException

addArchivedFileSet

void addArchivedFileSet(java.io.File archiveFile,
                        java.lang.String[] includes,
                        java.lang.String[] excludes)
                        throws ArchiverException
Throws:
ArchiverException

addArchivedFileSet

void addArchivedFileSet(java.io.File archiveFile,
                        java.lang.String prefix,
                        java.lang.String[] includes,
                        java.lang.String[] excludes)
                        throws ArchiverException
Throws:
ArchiverException

getDestFile

java.io.File getDestFile()

setDestFile

void setDestFile(java.io.File destFile)

setDefaultFileMode

void setDefaultFileMode(int mode)

getDefaultFileMode

int getDefaultFileMode()

setDefaultDirectoryMode

void setDefaultDirectoryMode(int mode)

getDefaultDirectoryMode

int getDefaultDirectoryMode()

getIncludeEmptyDirs

boolean getIncludeEmptyDirs()

setIncludeEmptyDirs

void setIncludeEmptyDirs(boolean includeEmptyDirs)

setDotFileDirectory

void setDotFileDirectory(java.io.File dotFileDirectory)

getFiles

java.util.Map getFiles()

isForced

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:
setForced(boolean), isSupportingForced()

setForced

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()

isSupportingForced

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

Returns:
True, if the archiver does support uptodate checks, false otherwise
See Also:
setForced(boolean), isForced()


Copyright © 2001-2006 Codehaus. All Rights Reserved.