Skip to content

Maven zip file corruption #3504

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

Open
malcolmsparks opened this issue Mar 11, 2025 · 6 comments
Open

Maven zip file corruption #3504

malcolmsparks opened this issue Mar 11, 2025 · 6 comments
Assignees

Comments

@malcolmsparks
Copy link

I have noticed, however, that the zip file here: https://repo1.maven.org/maven2/org/finos/cdm/cdm-json-schema/6.1.0/cdm-json-schema-6.1.0.zip (found in dir https://repo1.maven.org/maven2/org/finos/cdm/cdm-json-schema/6.1.0/) does not appear to be a proper zip file. I've tested with 6.0.0, 5.20.0 and 6.0.0-dev.73 - all seem to have the same problem.

This is the result with unzip on Linux:

$ unzip -d tmp cdm-json-schema-6.1.0.zip 
Archive:  cdm-json-schema-6.1.0.zip
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of cdm-json-schema-6.1.0.zip or
        cdm-json-schema-6.1.0.zip.zip, and cannot find cdm-json-schema-6.1.0.zip.ZIP, period.
@chrisisla
Copy link
Contributor

Hi @malcolmsparks
It's actually a zip within a zip, so if you use a zip manager like 7Zip for example and unzip the zip file you'll get a cdm-json-schema-6.1.0 file. If you then unzip that you'll get the jsonschema directory which holds all the schema files.
Hope that helps!

@minesh-s-patel
Copy link
Contributor

Hi @malcolmsparks It's actually a zip within a zip, so if you use a zip manager like 7Zip for example and unzip the zip file you'll get a cdm-json-schema-6.1.0 file. If you then unzip that you'll get the jsonschema directory which holds all the schema files. Hope that helps!

A zip within a zip? That sounds like a but to me :-)

@minesh-s-patel
Copy link
Contributor

@malcolmsparks @chrisisla

I found the issue. Its not actually zip file at all! It is a compressed tar.

See https://github.com/finos/common-domain-model/blob/b06913fe28e55a23878446d9879dfde328586b0e/codefresh.yml#L269C1-L270C1

@malcolmsparks I tested and it works when you untar it:

tar -xvzf  cdm-json-schema-6.1.0.zip

@chrisisla
Copy link
Contributor

Hi @malcolmsparks It's actually a zip within a zip, so if you use a zip manager like 7Zip for example and unzip the zip file you'll get a cdm-json-schema-6.1.0 file. If you then unzip that you'll get the jsonschema directory which holds all the schema files. Hope that helps!

A zip within a zip? That sounds like a but to me :-)

:D think you mean a "bug"....

The other zip files can be opened on windows using a zip manager, but as you say, a zipped tar file, so a compressed file (tar) within a compressed file (zip) ;)

@minesh-s-patel
Copy link
Contributor

minesh-s-patel commented Mar 12, 2025

Hi @malcolmsparks It's actually a zip within a zip, so if you use a zip manager like 7Zip for example and unzip the zip file you'll get a cdm-json-schema-6.1.0 file. If you then unzip that you'll get the jsonschema directory which holds all the schema files. Hope that helps!

A zip within a zip? That sounds like a but to me :-)

:D think you mean a "bug"....

The other zip files can be opened on windows using a zip manager, but as you say, a zipped tar file, so a compressed file (tar) within a compressed file (zip) ;)

I think all we need to do is rename it to .tar.gz and its correct. The Bug is that we named it zip.

@chrisisla
Copy link
Contributor

Reviewed at the TAWG 2025-04-10. No concerns on this approach, moved to Approved.

@chrisisla chrisisla moved this from Current to Approved in CDM Technical Architecture WG Apr 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Approved
Development

No branches or pull requests

3 participants