public class TarGzArchiver
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.io.File |
destFile |
private org.apache.maven.plugin.logging.Log |
log |
private java.util.List<java.io.File> |
sourceDirs |
Constructor and Description |
---|
TarGzArchiver() |
Modifier and Type | Method and Description |
---|---|
void |
addDirectory(java.io.File directory) |
private void |
addToTarRecursively(java.io.File tarRootDir,
java.io.File source,
org.apache.commons.compress.archivers.tar.TarArchiveOutputStream tarStream) |
private static void |
copyFileContentToTarStream(java.io.File source,
org.apache.commons.compress.archivers.tar.TarArchiveOutputStream tarStream) |
void |
createArchive() |
private org.apache.commons.compress.archivers.tar.TarArchiveEntry |
createTarEntry(java.io.File tarRootDir,
java.io.File source) |
private java.nio.file.attribute.PosixFileAttributes |
getAttributes(java.io.File source) |
private java.nio.file.Path |
getRelativeSymLinkTarget(java.io.File source,
java.io.File baseDir) |
private static boolean |
isSymbolicLink(java.io.File file) |
private boolean |
resolvesBelow(java.io.File source,
java.io.File baseDir) |
void |
setDestFile(java.io.File destFile) |
void |
setLog(org.apache.maven.plugin.logging.Log log) |
private static java.lang.String |
slashify(java.nio.file.Path path) |
private void |
validate() |
private java.io.File destFile
private java.util.List<java.io.File> sourceDirs
private org.apache.maven.plugin.logging.Log log
public void setLog(org.apache.maven.plugin.logging.Log log)
public void setDestFile(java.io.File destFile)
public void addDirectory(java.io.File directory)
public void createArchive() throws java.io.IOException
java.io.IOException
private void validate() throws java.io.IOException
java.io.IOException
private void addToTarRecursively(java.io.File tarRootDir, java.io.File source, org.apache.commons.compress.archivers.tar.TarArchiveOutputStream tarStream) throws java.io.IOException
java.io.IOException
private org.apache.commons.compress.archivers.tar.TarArchiveEntry createTarEntry(java.io.File tarRootDir, java.io.File source) throws java.io.IOException
java.io.IOException
private static java.lang.String slashify(java.nio.file.Path path)
private java.nio.file.attribute.PosixFileAttributes getAttributes(java.io.File source)
private static void copyFileContentToTarStream(java.io.File source, org.apache.commons.compress.archivers.tar.TarArchiveOutputStream tarStream) throws java.io.IOException
java.io.IOException
private boolean resolvesBelow(java.io.File source, java.io.File baseDir) throws java.io.IOException
java.io.IOException
private java.nio.file.Path getRelativeSymLinkTarget(java.io.File source, java.io.File baseDir) throws java.io.IOException
java.io.IOException
private static boolean isSymbolicLink(java.io.File file)