org.codehaus.plexus.archiver
Interface Archiver

All Known Implementing Classes:
AbstractArchiver

public interface Archiver

Version:
$Revision: 3651 $ $Date: 2006-08-21 17:05:02 -0400 (Mon, 21 Aug 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 setForced(boolean forced)
          Sets, whether recreating the archive is forced (default).
 void setIncludeEmptyDirs(boolean includeEmptyDirs)
           
 

Field Detail

ROLE

public static final java.lang.String ROLE
Method Detail

createArchive

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

addDirectory

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

addDirectory

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

addDirectory

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

addDirectory

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

addFile

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

addFile

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

addArchivedFileSet

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

addArchivedFileSet

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

addArchivedFileSet

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

addArchivedFileSet

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

getDestFile

public java.io.File getDestFile()

setDestFile

public void setDestFile(java.io.File destFile)

setDefaultFileMode

public void setDefaultFileMode(int mode)

getDefaultFileMode

public int getDefaultFileMode()

setDefaultDirectoryMode

public void setDefaultDirectoryMode(int mode)

getDefaultDirectoryMode

public int getDefaultDirectoryMode()

getIncludeEmptyDirs

public boolean getIncludeEmptyDirs()

setIncludeEmptyDirs

public void setIncludeEmptyDirs(boolean includeEmptyDirs)

getFiles

public java.util.Map getFiles()

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

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

isSupportingForced

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