You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Dan Tran <da...@gmail.com> on 2014/06/02 20:47:09 UTC

Pack with native tar, unpack with maven-dependency-plugin failure

Hi

I have a number of tar.gz artifacts packed with cygwin/linux tar, but
maven-dependency-plugin fails to unpack with with the following error (
have you seen this)

Caused by: java.util.zip.ZipException: Not in GZIP format
at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:164)
at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:78)
at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:90)
at
org.codehaus.plexus.archiver.tar.TarUnArchiver$UntarCompressionMethod.decompress(TarUnArchiver.java:191)
at
org.codehaus.plexus.archiver.tar.TarUnArchiver$UntarCompressionMethod.access$000(TarUnArchiver.java:112)
at
org.codehaus.plexus.archiver.tar.TarUnArchiver.execute(TarUnArchiver.java:86)
... 26 more

Thanks

-Dan

Re: Pack with native tar, unpack with maven-dependency-plugin failure

Posted by Alexander Kriegisch <Al...@Kriegisch.name>.
Hi Dan.

I vaguely remember a similar problem with ZIP archives and Java. Can you please send me a sample or two privately?
-- 
Alexander Kriegisch


> Am 02.06.2014 um 20:47 schrieb Dan Tran <da...@gmail.com>:
> 
> Hi
> 
> I have a number of tar.gz artifacts packed with cygwin/linux tar, but
> maven-dependency-plugin fails to unpack with with the following error (
> have you seen this)
> 
> Caused by: java.util.zip.ZipException: Not in GZIP format
> at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:164)
> at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:78)
> at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:90)
> at
> org.codehaus.plexus.archiver.tar.TarUnArchiver$UntarCompressionMethod.decompress(TarUnArchiver.java:191)
> at
> org.codehaus.plexus.archiver.tar.TarUnArchiver$UntarCompressionMethod.access$000(TarUnArchiver.java:112)
> at
> org.codehaus.plexus.archiver.tar.TarUnArchiver.execute(TarUnArchiver.java:86)
> ... 26 more
> 
> Thanks
> 
> -Dan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Pack with native tar, unpack with maven-dependency-plugin failure

Posted by Jörg Schaible <jo...@swisspost.com>.
Hi Dan,

Dan Tran wrote:

> I found the root cause of this issue where  I need to force a '-z' option
> during native tar compression.  Without this flag, the output is just a
> normal tar file where native tar is very smart to figure this out. Where
> are plexus-archiver only looks for gz signature and bails out.

You may always use the "file" utility to get an idea of the real file 
format:

================= %< =================
~/tmp $ tar cf test-tar.tar.gz *.txt
~/tmp $ tar czf test-gz.tar.gz *.txt
~/tmp $ tar cjf test-bz2.tar.gz *.txt
~/tmp $ file *.tar.gz
test-bz2.tar.gz: bzip2 compressed data, block size = 900k
test-gz.tar.gz:  gzip compressed data, last modified: Tue Jun  3 07:50:26 
2014, from Unix
test-tar.tar.gz: POSIX tar archive (GNU)
================= %< =================

Cheers,
Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Pack with native tar, unpack with maven-dependency-plugin failure

Posted by Dan Tran <da...@gmail.com>.
I found the root cause of this issue where  I need to force a '-z' option
during native tar compression.  Without this flag, the output is just a
normal tar file where native tar is very smart to figure this out. Where
are plexus-archiver only looks for gz signature and bails out.

Thanks

-Dan


On Mon, Jun 2, 2014 at 11:47 AM, Dan Tran <da...@gmail.com> wrote:

>
> Hi
>
> I have a number of tar.gz artifacts packed with cygwin/linux tar, but
> maven-dependency-plugin fails to unpack with with the following error (
> have you seen this)
>
> Caused by: java.util.zip.ZipException: Not in GZIP format
> at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:164)
> at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:78)
>  at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:90)
> at
> org.codehaus.plexus.archiver.tar.TarUnArchiver$UntarCompressionMethod.decompress(TarUnArchiver.java:191)
>  at
> org.codehaus.plexus.archiver.tar.TarUnArchiver$UntarCompressionMethod.access$000(TarUnArchiver.java:112)
> at
> org.codehaus.plexus.archiver.tar.TarUnArchiver.execute(TarUnArchiver.java:86)
>  ... 26 more
>
> Thanks
>
> -Dan
>
>