Package org.codehaus.plexus.archiver.dir
Class DirectoryArchiver
- java.lang.Object
-
- org.codehaus.plexus.logging.AbstractLogEnabled
-
- org.codehaus.plexus.archiver.AbstractArchiver
-
- org.codehaus.plexus.archiver.dir.DirectoryArchiver
-
- All Implemented Interfaces:
Archiver,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 Modifier and Type Field Description private java.util.List<java.lang.Runnable>directoryChmods-
Fields inherited from interface org.codehaus.plexus.archiver.Archiver
DEFAULT_DIR_MODE, DEFAULT_FILE_MODE, DEFAULT_SYMLILNK_MODE, DUPLICATES_ADD, DUPLICATES_FAIL, DUPLICATES_PRESERVE, DUPLICATES_SKIP, DUPLICATES_VALID_BEHAVIORS, ROLE
-
-
Constructor Summary
Constructors Constructor Description DirectoryArchiver()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcleanUp()protected voidclose()protected voidcopyFile(ArchiveEntry entry, java.lang.String vPath)Copies the specified file to the specified path, creating any ancestor directory structure as necessary.voidexecute()protected java.lang.StringgetArchiveType()private static voidmakeParentDirectories(java.io.File file)voidresetArchiver()private voidsetFileModes(ArchiveEntry entry, java.io.File outFile, long inLastModified)-
Methods inherited from class org.codehaus.plexus.archiver.AbstractArchiver
addArchivedFileSet, addArchivedFileSet, addArchivedFileSet, addArchivedFileSet, addArchivedFileSet, addArchivedFileSet, addArchiveFinalizer, addDirectory, addDirectory, addDirectory, addDirectory, addFile, addFile, addFileSet, addResource, addResources, addSymlink, addSymlink, asArchiveEntry, asResourceCollection, checkForced, configureReproducible, contextualize, createArchive, getDefaultDirectoryMode, getDefaultFileMode, getDestFile, getDirectoryMode, getDuplicateBehavior, getFileMode, getFilenameComparator, getFiles, getIncludeEmptyDirs, getLastModifiedDate, getLogger, getOverrideDirectoryMode, getOverrideFileMode, getOverrideGid, getOverrideGroupName, getOverrideUid, getOverrideUserName, getRawDefaultFileMode, getResources, hasVirtualFiles, isForced, isIgnorePermissions, isSupportingForced, isUptodate, isUseJvmChmod, normalizeLastModifiedDate, postCreateArchive, revert, runArchiveFinalizers, setArchiveFinalizers, setDefaultDirectoryMode, setDefaultFileMode, setDestFile, setDirectoryMode, setDotFileDirectory, setDuplicateBehavior, setFileMode, setFilenameComparator, setForced, setIgnorePermissions, setIncludeEmptyDirs, setLastModifiedDate, setOverrideGid, setOverrideGroupName, setOverrideUid, setOverrideUserName, setUseJvmChmod, validate
-
-
-
-
Method Detail
-
resetArchiver
public void resetArchiver() throws java.io.IOException- Throws:
java.io.IOException
-
execute
public void execute() throws ArchiverException, java.io.IOException- Specified by:
executein classAbstractArchiver- Throws:
ArchiverExceptionjava.io.IOException
-
copyFile
protected void copyFile(ArchiveEntry entry, java.lang.String vPath) throws ArchiverException, java.io.IOException
Copies the specified file to the specified path, creating any ancestor directory structure as necessary.- Parameters:
entry- 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 structurejava.io.IOException- If there is a problem copying the file
-
makeParentDirectories
private static void makeParentDirectories(java.io.File file)
-
setFileModes
private void setFileModes(ArchiveEntry entry, java.io.File outFile, long inLastModified)
-
cleanUp
protected void cleanUp() throws java.io.IOException- Overrides:
cleanUpin classAbstractArchiver- Throws:
java.io.IOException
-
close
protected void close() throws java.io.IOException- Specified by:
closein classAbstractArchiver- Throws:
java.io.IOException
-
getArchiveType
protected java.lang.String getArchiveType()
- Specified by:
getArchiveTypein classAbstractArchiver
-
-