arquillian / arquillian-spacelift

Arquillian process and package manager. Makes executing an external process or fetching platform depends dependencies an easier job
4 stars 7 forks source link

Change Zip4j in favor of commons-compress #15

Closed lordofthejars closed 9 years ago

lordofthejars commented 10 years ago

UnZip tool is based on zip4j library. The problem is that sometimes the files are tar, gzip, 7z, or arj. I suggest to change zip4j to commons-compress which supports a lot of compress algorithms in order to be able to write some Tool like UnzipTool, UntarTool and so on and even a generic UnCompressTool which you set the algorithm to be used.

http://search.maven.org/#artifactdetails%7Corg.apache.commons%7Ccommons-compress%7C1.8.1%7Cjar

The good news is that this library is maintained as well (last version released is from May 2014.

Again if you agree I will implement the change.

Note: that I have never found this error because I download zip files but today it is the first time I have found this barrier.

Of course another approach is to use GZipIS but because we are already using zip4j we can drop it and add this library.

lordofthejars commented 10 years ago

Sorry commons-compress only compresses data, not uncompress. I will continue researching for a library but I think we need a way to face the problem described with tar files.

lordofthejars commented 10 years ago

Done, I have a POC for using zip, bzip, gzip, tar, and so on. I will create a PR as soon as possible.

smiklosovic commented 10 years ago

awesome, I believe somebody will review it :)

lordofthejars commented 10 years ago

Cool. Currently the only thing that don't work (making some research) is setting Posix permissions of zip files (works with tar and gzip) to uncompress directory.

TadeasKriz commented 10 years ago

@lordofthejars It depends on the way it's decompressed. If it's done by Java's Zip implementation, you won't be probably able to simply restore the permissions, because Java doesn't have this kind of access to files afaik.

Which brings me to a question how is the tar and gzip done? Running a binary?

lordofthejars commented 10 years ago

well I am using commons-compress which in case of tar and gzip give you this information.

lordofthejars commented 10 years ago

Done!!! Now I can start to collaborate. I have no permissions, but can I assign me the issues I have just opened?

Thanks

lordofthejars commented 10 years ago

Related with https://issues.jboss.org/browse/ARQ-1864

kpiwko commented 10 years ago

Where is the PR? :-)

lordofthejars commented 10 years ago

I have the whole implementation at home, but writing some tests before sending PR.

2014-10-06 14:00 GMT+02:00 Karel Piwko notifications@github.com:

Where is the PR? :-)

— Reply to this email directly or view it on GitHub https://github.com/arquillian/arquillian-spacelift/issues/15#issuecomment-58007245 .

+----------------------------------------------------------+ Alex Soto Bueno - Computer Engineer www.lordofthejars.com +----------------------------------------------------------+

lordofthejars commented 10 years ago

Moreover I have implemented for tar, tar.gz and zip so I think this is an improvement for Linux users who cannot use zip as compress file.

2014-10-06 14:32 GMT+02:00 Alex Soto asotobu@gmail.com:

I have the whole implementation at home, but writing some tests before sending PR.

2014-10-06 14:00 GMT+02:00 Karel Piwko notifications@github.com:

Where is the PR? :-)

— Reply to this email directly or view it on GitHub https://github.com/arquillian/arquillian-spacelift/issues/15#issuecomment-58007245 .

+----------------------------------------------------------+ Alex Soto Bueno - Computer Engineer www.lordofthejars.com +----------------------------------------------------------+

+----------------------------------------------------------+ Alex Soto Bueno - Computer Engineer www.lordofthejars.com +----------------------------------------------------------+

kpiwko commented 9 years ago

Closing, this was resolved by https://github.com/lordofthejars/arquillian-spacelift/commit/3301929a722c0a203e3416e7de6bcc3209cf6b61