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

Choose URL matching the hash of the local artifact #59

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

jvierling
Copy link
Contributor

This PR changes the behavior of mvn2nix such that it uses the URL which matches the hash of the artifact in the local repository. This should solve mismatches such as reported in Issue #29. The URL of an artifact is determined by retrieving the artifact from the URL, computing its SHA256 and comparing it to the SHA256 of the local artifact. As a consequence each artifact has to be downloaded at least once for the creation of the lockfile.

Furthermore, I have abstracted parts of the algorithm in order to make unit testing somewhat easier. In particular, the PR includes a test that produces a hash mismatch which is fixed by the new way to choose the artifact URL.

@fzakaria
Copy link
Owner

@jvierling -- I don't have too much time to review this.
Did you want to become a maintainer?
If so let me know -- reach out to me over email please.

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

Successfully merging this pull request may close these issues.

2 participants