[ 
https://issues.apache.org/jira/browse/IVY-1320?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13150160#comment-13150160
 ] 

Carl Steinbach commented on IVY-1320:
-------------------------------------

I upgraded the Ivy dependency on the Apache Hive build from 2.1.0 to 2.2.0, 
cleaned out my
.ivy2 directory, and started running into the following error:

{noformat}

BUILD FAILED
/home/carl/Work/repos/hive2/build.xml:297: The following error occurred while 
executing this line:
/home/carl/Work/repos/hive2/build.xml:154: The following error occurred while 
executing this line:
/home/carl/Work/repos/hive2/shims/build.xml:65: The following error occurred 
while executing this line:
/home/carl/Work/repos/hive2/build-common.xml:132: Error while expanding 
/home/carl/Work/repos/hive2/build/hadoopcore/hadoop-0.20.1.tar.gz
java.io.IOException: Not in GZIP format
        at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:143)
        at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:58)
        at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:67)
        at 
org.apache.tools.ant.taskdefs.Untar$UntarCompressionMethod.decompress(Untar.java:235)
        at org.apache.tools.ant.taskdefs.Untar.expandStream(Untar.java:158)
        at org.apache.tools.ant.taskdefs.Untar.expandFile(Untar.java:114)
        at org.apache.tools.ant.taskdefs.Expand.execute(Expand.java:132)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at 
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:390)
        at org.apache.tools.ant.Target.performTasks(Target.java:411)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
        at 
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
        at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at 
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:390)
        at org.apache.tools.ant.Target.performTasks(Target.java:411)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
        at 
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
        at org.apache.tools.ant.taskdefs.SubAnt.execute(SubAnt.java:302)
        at org.apache.tools.ant.taskdefs.SubAnt.execute(SubAnt.java:221)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at 
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at 
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at 
org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:398)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at 
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:390)
        at org.apache.tools.ant.Target.performTasks(Target.java:411)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1366)
        at 
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
        at org.apache.tools.ant.Main.runBuild(Main.java:801)
        at org.apache.tools.ant.Main.startAnt(Main.java:218)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
{noformat}

I checked the files in the local cache and noticed the following:

{noformat}
% file ~/.ivy2/cache/hadoop/core/sources/*.gz
/home/carl/.ivy2/cache/hadoop/core/sources/hadoop-0.20.1.tar.gz:
POSIX tar archive
/home/carl/.ivy2/cache/hadoop/core/sources/hadoop-0.20.3-CDH3-SNAPSHOT.tar.gz:
POSIX tar archive
{noformat}

I tried reverting to Ivy 2.1.0 and the problem dissappears:

{noformat}
% file ~/.ivy2/cache/hadoop/core/sources/*.gz
/home/carl/.ivy2/cache/hadoop/core/sources/hadoop-0.20.1.tar.gz:
gzip compressed data, from FAT filesystem (MS-DOS, OS/2, NT)
/home/carl/.ivy2/cache/hadoop/core/sources/hadoop-0.20.3-CDH3-SNAPSHOT.tar.gz:
gzip compressed data, from FAT filesystem (MS-DOS, OS/2, NT)
{noformat}


Here's the relevant retrieve task:

{noformat}
  <target name="ivy-retrieve-hadoop-source" depends="ivy-init-settings"
    description="Retrieve Ivy-managed Hadoop source artifacts" 
unless="ivy.skip">
    <echo message="Project: ${ant.project.name}"/>
    <ivy:retrieve settingsRef="${ant.project.name}.ivy.settings"
      pattern="${build.dir.hadoop}/[artifact]-[revision].[ext]"/>
  </target>
{noformat}

and the dependency:

{noformat}
    <dependency org="hadoop" name="core" rev="${hadoop.version.ant-internal}">
      <artifact name="hadoop" type="source" ext="tar.gz"/>
    </dependency>
{noformat}

and the resolver:

{noformat}
    <url name="hadoop-source">
      <artifact 
pattern="${hadoop.mirror}/hadoop/core/[artifact]-[revision]/[artifact]-[revision].[ext]"
 />
    </url>
{noformat}

I upgraded to 2.2.0 in order to get the fix for IVY-1148. I would prefer not to 
downgrade, so I'm curious to know if there's a work around for this issue.
                
> Retrieve task automatically decompresses tar.gz files, but doesn't remove gz 
> suffix
> -----------------------------------------------------------------------------------
>
>                 Key: IVY-1320
>                 URL: https://issues.apache.org/jira/browse/IVY-1320
>             Project: Ivy
>          Issue Type: Bug
>    Affects Versions: 2.2.0-RC1, 2.2.0
>            Reporter: Carl Steinbach
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to