Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

Commit

Permalink
#70 Fix unarchiving tar on osx
Browse files Browse the repository at this point in the history
  • Loading branch information
broundee committed Mar 29, 2015
1 parent 9bfc65d commit a4005ea
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions pom.xml
Expand Up @@ -58,6 +58,11 @@
<version>3.2</version>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.9</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/pl/allegro/tdr/gruntmaven/archive/TarUtil.java
Expand Up @@ -15,12 +15,12 @@
*/
package pl.allegro.tdr.gruntmaven.archive;

import java.io.*;

import org.apache.commons.compress.archivers.ArchiveEntry;
import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
import org.apache.commons.io.IOUtils;
import org.apache.maven.plugin.logging.Log;
import org.codehaus.plexus.archiver.tar.TarEntry;
import org.codehaus.plexus.archiver.tar.TarInputStream;

import java.io.*;

/**
*
Expand All @@ -32,12 +32,12 @@ private TarUtil() {
}

public static void untar(File source, File target, Log logger) {
TarInputStream tarInput = null;
TarEntry entry;
TarArchiveInputStream tarInput = null;
ArchiveEntry entry;
OutputStream output = null;

try {
tarInput = new TarInputStream(new FileInputStream(source));
tarInput = new TarArchiveInputStream(new FileInputStream(source));

entry = tarInput.getNextEntry();
while (entry != null) {
Expand Down

0 comments on commit a4005ea

Please sign in to comment.