org.codehaus.plexus.archiver.dir
Class DirectoryArchiver

java.lang.Object
  extended by org.codehaus.plexus.logging.AbstractLogEnabled
      extended by org.codehaus.plexus.archiver.AbstractArchiver
          extended by org.codehaus.plexus.archiver.dir.DirectoryArchiver
All Implemented Interfaces:
Archiver, FilterEnabled, FinalizerEnabled, org.codehaus.plexus.logging.LogEnabled, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable

public class DirectoryArchiver
extends AbstractArchiver

A plexus archiver implementation that stores the files to archive in a directory.


Field Summary
 
Fields inherited from interface org.codehaus.plexus.archiver.Archiver
DEFAULT_DIR_MODE, DEFAULT_FILE_MODE, DUPLICATES_ADD, DUPLICATES_FAIL, DUPLICATES_PRESERVE, DUPLICATES_SKIP, DUPLICATES_VALID_BEHAVIORS, ROLE
 
Constructor Summary
DirectoryArchiver()
           
 
Method Summary
protected  void cleanUp()
           
protected  void close()
           
protected  void copyFile(ArchiveEntry entry, String vPath)
          Copies the specified file to the specified path, creating any ancestor directory structure as necessary.
 void execute()
           
protected  String getArchiveType()
           
 void resetArchiver()
           
 
Methods inherited from class org.codehaus.plexus.archiver.AbstractArchiver
addArchivedFileSet, addArchivedFileSet, addArchivedFileSet, addArchivedFileSet, addArchivedFileSet, addArchiveFinalizer, addDirectory, addDirectory, addDirectory, addDirectory, addFile, addFile, addFileSet, addResource, addResources, asArchiveEntry, asArchiveEntry, asResourceCollection, checkForced, contextualize, createArchive, getArchiveFinalizers, getDefaultDirectoryMode, getDefaultFileMode, getDestFile, getDirectoryMode, getDirs, getDuplicateBehavior, getFileMode, getFiles, getIncludeEmptyDirs, getLogger, getOverrideDirectoryMode, getOverrideFileMode, getRawDefaultDirectoryMode, getRawDefaultFileMode, getResources, hasVirtualFiles, isForced, isIgnorePermissions, isSupportingForced, isUptodate, isUseJvmChmod, revert, runArchiveFinalizers, setArchiveFilters, setArchiveFinalizers, setDefaultDirectoryMode, setDefaultFileMode, setDestFile, setDirectoryMode, setDotFileDirectory, setDuplicateBehavior, setFileMode, setForced, setIgnorePermissions, setIncludeEmptyDirs, setUseJvmChmod, validate
 
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectoryArchiver

public DirectoryArchiver()
Method Detail

resetArchiver

public void resetArchiver()

execute

public void execute()
             throws ArchiverException,
                    IOException
Specified by:
execute in class AbstractArchiver
Throws:
ArchiverException
IOException

copyFile

protected void copyFile(ArchiveEntry entry,
                        String vPath)
                 throws ArchiverException,
                        IOException
Copies the specified file to the specified path, creating any ancestor directory structure as necessary.

Parameters:
file - The file to copy (IOException will be thrown if this does not exist)
vPath - The fully qualified path to copy the file to.
Throws:
ArchiverException - If there is a problem creating the directory structure
IOException - If there is a problem copying the file

cleanUp

protected void cleanUp()
Overrides:
cleanUp in class AbstractArchiver

close

protected void close()
              throws IOException
Specified by:
close in class AbstractArchiver
Throws:
IOException

getArchiveType

protected String getArchiveType()
Specified by:
getArchiveType in class AbstractArchiver


Copyright © 2008-2012 Sonatype, Inc.. All Rights Reserved.