Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 352675

Summary: tar.gz files on the build path are no longer readable and cause build path errors
Product: [Eclipse Project] JDT Reporter: Nicholas Jasieniecki <nastharl>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: VERIFIED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: jarthana, manoj.palat, Olivier_Thomann, prashanto.chatterjee, stephan.herrmann
Version: 3.7Keywords: needinfo
Target Milestone: 4.8 M1   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:
Attachments:
Description Flags
Java build-path error with tar.gz ivy artifact dependency none

Description Nicholas Jasieniecki CLA 2011-07-20 16:20:50 EDT
Bug title says it all, if you have a tar.gz file with code in it you need, the build-path complains saying its not a valid zip file.
Comment 1 Walter Harley CLA 2011-07-20 18:58:26 EDT
Nicholas, is this new behavior? What version of Eclipse did it last work for you in? Is it possible that other changes to your environment caused this (e.g., did you use to have a .gz tool on the path and you no longer have it?)
Comment 2 Olivier Thomann CLA 2011-07-21 09:22:45 EDT
In what version of Eclipse this worked ? What build are you using ?
Comment 3 Nicholas Jasieniecki CLA 2011-08-01 11:17:04 EDT
Sorry for long wait on reply.

Going by the releases that are downloadable - the final Galileo release worked OK, its extremly unlikly that an environmental change broke this as a swap of nothing but the eclipse app on my mac fixed it, and if you could tell me the easiest way to get the build number i can post it.
Comment 4 Olivier Thomann CLA 2011-08-16 15:26:26 EDT
You can get the Eclipse build id from the Help>About Eclipse SDK dialog.

It would also be good if you could provide steps to reproduce and attach a tar.gz file that worked and no longer works.

Thanks.
Comment 5 Prashanto Chatterjee CLA 2017-07-08 01:38:16 EDT
Created attachment 269290 [details]
Java build-path error with tar.gz ivy artifact dependency
Comment 6 Prashanto Chatterjee CLA 2017-07-08 01:47:05 EDT
I am experiencing the exact issue. This is a very old thread; not sure why more people have not run into this so far.

I have an ant-ivy project that I import into eclipse and try to add the Ivy library. The project has a tar.gz artifact dependency. The project complains about the artifact being an invalid ZIP archive. Kindly refer the attachment.

In order to circumvent this issue, I extracted the tar.gz to a zip archive and updated the ivy cache to point to the zip instead. This workaround FIXED the issue and Eclipse was able to properly add the artifact to the project's build path.

This appears to me as a specific Eclipse Java build path issue as I am able to independently build the ivy project from the command line.
I am working on an SDK plugin and this issue is a blocker for me as I dont want the underlying product SDK to change the published artifact from tar.gz to zip. 

Any help with the issue will be appreciated. Kindly let me know if any other details are required.
Comment 7 Stephan Herrmann CLA 2017-07-08 06:14:47 EDT
(In reply to Prashanto Chatterjee from comment #6)
> I am experiencing the exact issue. This is a very old thread; not sure why
> more people have not run into this so far.
> 
> I have an ant-ivy project that I import into eclipse and try to add the Ivy
> library.

Please excuse my ignorance: how do you add "the Ivy library", is there an Eclipse plugin that connects to Ivy?

Also, what's in the tar.gz? Java .class files? Or in which way is this dependency used?
Comment 8 Prashanto Chatterjee CLA 2017-07-12 00:19:21 EDT
I am using ivyde eclipse plugin. The tar.gz file contains our compressed runtime that includes jar files, script files to bring up the services etc.

"Or in which way is this dependency used?"
This was the root cause of the issue. I was adding the Ivy library programmatically and included all the configurations (*). This was a mistake and I was required to specify only the runtime and test configurations.

Thanks for your reply.
Comment 9 Stephan Herrmann CLA 2017-07-12 17:42:29 EDT
Closing since I understand 8 as saying there is no problem when using ivyde correctly.
Comment 10 Manoj N Palat CLA 2017-08-01 04:01:59 EDT
Verified with Eclipse Photon 4.8 M1 Build id: I20170731-0800
[based on comment 8]