Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Zip4j in favor of commons-compress #15

Closed
lordofthejars opened this issue Oct 2, 2014 · 12 comments
Closed

Change Zip4j in favor of commons-compress #15

lordofthejars opened this issue Oct 2, 2014 · 12 comments

Comments

@lordofthejars
Copy link
Member

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
Copy link
Member Author

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
Copy link
Member Author

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

@smiklosovic
Copy link
Member

awesome, I believe somebody will review it :)

@lordofthejars
Copy link
Member Author

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
Copy link
Member

@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
Copy link
Member Author

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

@lordofthejars
Copy link
Member Author

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

Thanks

@lordofthejars
Copy link
Member Author

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

@kpiwko
Copy link
Member

kpiwko commented Oct 6, 2014

Where is the PR? :-)

@lordofthejars
Copy link
Member Author

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
#15 (comment)
.

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

@lordofthejars
Copy link
Member Author

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
#15 (comment)
.

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

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

lordofthejars added a commit to lordofthejars/arquillian-spacelift that referenced this issue Oct 12, 2014
@kpiwko
Copy link
Member

kpiwko commented Jan 15, 2015

Closing, this was resolved by lordofthejars@3301929

@kpiwko kpiwko closed this as completed Jan 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants