Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 33897 - [Import/Export] Export to .tar.gz or .tar.bz2
Summary: [Import/Export] Export to .tar.gz or .tar.bz2
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0.2   Edit
Hardware: All Linux-GTK
: P2 enhancement with 6 votes (vote)
Target Milestone: 3.1 M4   Edit
Assignee: Billy Biggs CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-05 14:47 EST by Johan Walles CLA
Modified: 2005-03-01 02:18 EST (History)
13 users (show)

See Also:


Attachments
Tar import plugin (558.08 KB, application/octet-stream)
2004-08-11 06:22 EDT, Marcus Crafter CLA
no flags Details
[PATCH] compressed and uncompresses tar export support (41.31 KB, patch)
2004-08-17 11:15 EDT, Marcus Crafter CLA
no flags Details | Diff
Updated patch (97.54 KB, application/octet-stream)
2004-12-08 09:49 EST, Marcus Crafter CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johan Walles CLA 2003-03-05 14:47:36 EST
Right click a Java project.  Choose "Export...".  A window opens where you can
choose between different export targets.

There is no ".tar.gz" target or ".tar.bz2".  I would like to have either one (or
both).  If I must choose one, I prefer ".tar.bz2", but I don't really have a
strong opinion about it; ".tar.gz" would be fine as well.  The reason I somewhat
prefer bzip2 is that bzip2 makes files noticably smaller than gzip, and my
impression is that gzip is slowly being outcompeted.

A Linux-GTK implementation would be good enough for me, but it is possible that
"Unix All" would be a better platform as other Unix users could probably be
interested in this as well.
Comment 1 Johan Walles CLA 2003-03-05 14:54:45 EST
One more thing; the exported file hierarchy should be identical to the one
exported by the "ZIP file" export target.
Comment 2 Olivier Thomann CLA 2003-03-05 16:23:19 EST
That looks more like a JDT/UI feature.
Move to JDT/UI for comment.
Comment 3 Dirk Baeumer CLA 2003-03-06 03:36:39 EST
Compressed file exporting (like ZIP) is provided by the platform. 
Comment 4 Nick Edgar CLA 2003-03-11 23:41:32 EST
There are no plans for the UI team to work on this defect until higher 
priority items are addressed.  If you would like to work on this defect, 
please let us know on the platform-ui-dev mailing list.
Comment 5 Marcus Crafter CLA 2004-08-11 06:22:09 EDT
Created attachment 13869 [details]
Tar import plugin

This zip file includes functionality for importing from tar files (compressed
and uncompressed with gzip or bzip2).

It's based off the tar file support included inside of the ANT plugin, and also
uses Commons Collections.
Comment 6 Marcus Crafter CLA 2004-08-17 11:15:15 EDT
Created attachment 14011 [details]
[PATCH] compressed and uncompresses tar export support

Hi There,

This attachment adds support for exporting to a compressed or uncompressed tar
file from within eclipse (eg. tar, tar.gz, tar.bz2)

The patch should apply cleanly to a org.eclipse.ui.ide R3.0 source tree (as
opposed to my tar import patch which was a separate plugin).

Everything seems to be working fine on my system (Debian Linux Sarge, Eclipse
3.0 GTK). Would be great to hear about other platforms.

Note, something in the patch that might be considered dodgy is an added
dependency on the org.apache.ant plugin (this is where the TarOutputStream
classes live), but if this is a real problem we could extract them in to this
plugin.

Please let me know if there's anything I need to do.

Hope this is all of use.

Cheers,

Marcus
Comment 7 Tod Creasey CLA 2004-08-30 11:59:50 EDT
Marcus - the ide cannot have any reliance on ant so we can't add this to the 
workbench.

I am going to move this to Ant to see if they wish to add it to thier plug-in.
Comment 8 Douglas Pollock CLA 2004-08-30 12:01:44 EDT
Another option is that the JAR file on which this patch is dependent get 
separated as a separate plug-in, and that org.eclipse.ui.workbench is made 
dependent on it. 
 
Comment 9 Marcus Crafter CLA 2004-08-31 04:11:20 EDT
Hi Tod,

Thanks for your feedback.

Sure, the dependency on the ant plugin was something I thought might have been a
bit of a problem.

The dependency is there only because there's 5 classes (which are internal to
ant) that provide the tar and bz2 stream classes. There's no real dependency to
ant functionality itself - just these classes.

So, perhaps there's several options:

* Extract the 5 classes required and put them into the ide, or into a separate
plugin (as Douglas suggested)

* Move the whole tar import/export to a separate plugin with the 5 classes, or
the ant dependency

* See what the ant folks would like to do

* Or something else.

I'd happy to make whatever changes are necessary - just let me know.

Perhaps extracting the 5 classes is the best way forward? That way there's no
dependency and all the source is included inside of the ide?

Anyway, looking forward to your thoughts?

Cheers,

Marcus
Comment 10 Tod Creasey CLA 2004-08-31 07:20:57 EDT
I think what you have done is just fine - I just think that we need to cut 
down on the size of the IDE and that this is better as a plug-in offered 
seperately from Eclipse.

I know a lot of people will like it - I just don't think we want to bundle it 
with the rest of the product.
Comment 11 Douglas Pollock CLA 2004-08-31 10:21:39 EDT
<flame> 
Dear Tod, 
 
This is no less than critical functionality for Linux, and it should be 
included in the default install.  It is embarassing that has taken this long to 
get this much work done it. 
 
 
Love, 
Billy & Doug. 
</flame> 
Comment 12 Tod Creasey CLA 2004-08-31 11:13:25 EDT
If we think this is that important then we should get it added as a plan item.
Comment 13 Tod Creasey CLA 2004-08-31 13:23:10 EDT
I'll take this one back as it is not clear where it should belong.

I am going to mark it P2 as it is potentially important so some members of the 
community that it should be considered.

Please vote on this report if you wish so that we can get an idea of the 
itnerest it.
Comment 14 Tod Creasey CLA 2004-08-31 13:23:45 EDT
Adding Jared as this may involve some refactoring with Ant.
Comment 15 Ben Konrath CLA 2004-09-02 17:23:11 EDT
Additionally, a plugin like this would be useful for our rpm plugin. Currently
we shell out and use tar. Yuk!
Comment 16 Aaron Luchko CLA 2004-12-01 17:48:11 EST
This functionality is really needed as zip doesn't support permissions (bug
79887).  Currently there is no way to create an archive in eclipse with
permissions preserved (this includes executable and write permissions) so
whatever file permissions you create in your project cannot be transferred via
exporting it as a zip.
Comment 17 Marcus Crafter CLA 2004-12-08 09:49:31 EST
Created attachment 16457 [details]
Updated patch

Hi There,

Hope all is going well.

I've updated the tar import/export patch against Eclipse 3.0.1.

The dependency to ANT has been removed, as I've extracted the necessary bzip2
and tar stream classes into separate library plugins, which are included. I
hope this fixes that issue.

The patch should integrate much better into 3.0.1 CVS now, as the previous
patches had another java package name. They should apply cleanly now.

Please let me know if there's anything else I need/should do.

Cheers,

Marcus
Comment 18 Billy Biggs CLA 2004-12-12 23:04:13 EST
I checked in support for import and export to .tar and .tar.gz in HEAD.  My
patch differs from Marcus' in two ways:

- I did my own implementation of a tar file reader and writer.  I figured
  the format was simple enough that I could just write my own and not have
  to bother including the apache code in the IDE plug-in.
- Rather than add another wizard, I renamed the "Zip file" import/export
  to the more generic "Archive file", making it smart enough to tell the
  difference when importing, and offering radio buttons (and filename
  extension guessing) to the export wizard to choose the format.

There are some limitations to my approach: I do not support .bz2 files, and my
implementation of the tar read and writer likely has bugs.  I think we should
probably switch to the Apache code before 3.1, but my implementation is a good
start and will let us fix the other issues like adding permissions support.

Marcus, I feel bad that I did not use more of your patch since it was well done,
but because I wanted to unify the two wizards I did not bother starting with
your code (I did use it as a reference though).  I hope you don't mind, and that
you will help find bugs in my code. :)
Comment 19 Michael Van Meekeren CLA 2004-12-13 10:34:56 EST
Billy can you verify that this was tested on other platforms that typically use
tar as well?  i.e. all Unix flavours/Mac 
Comment 20 Billy Biggs CLA 2004-12-15 18:39:49 EST
Tested so far on Solaris/Motif, MacOS, Linux/Motif, and
Linux/GTK+ (RH9 and Debian unstable).

Verified in I200412142000.
Comment 21 Andrew Overholt CLA 2005-02-28 14:24:15 EST
Billy, can your work be extended to bz2 as well?
Comment 22 Billy Biggs CLA 2005-03-01 02:18:21 EST
See bug 81900.  The problem is that java does not support bzip2 natively but it
does support gzip.