▲ | Tainnor 4 days ago | |||||||
Maven artifacts are immutable, so the whole resolution is deterministic (even if hard to understand), unless you're using snapshot versions (which are mutable) or you use version ranges (which is rare in the Maven world). | ||||||||
▲ | beart 4 days ago | parent | next [-] | |||||||
Maven artifacts are not immutable. Some maven repositories may prevent overwriting an already published version, but this is not guaranteed. I've personally seen this cause problems where a misconfigured CI job overwrote already published versions. npm used to allow you to unpublish (and may be overwrite?) published artifacts, but they removed that feature after a few notable events. Edit: I was not quite correct. It looks like you can still unpublish, but with specific criteria. However, you cannot ever publish a different package using the same version as an already published package. | ||||||||
▲ | chriswarbo 4 days ago | parent | prev | next [-] | |||||||
> Maven artifacts are immutable, so the whole resolution is deterministic Nope, Maven will grab anything which happens to have a particular filename from `~/.m2`, or failing that it will accept whatever a HTTP server gives it for a particular URL. It can compare downloaded artifacts against a hash; but that's misleading, since those hashes are provided by the same HTTP server as the artifact! (Useful for detecting a corrupt download; useless for knowing anything about the artifact or its provenance, etc.) This isn't an academic/theoretical issue; I've run into it myself https://discuss.gradle.org/t/plugins-gradle-org-serving-inco... | ||||||||
▲ | spooky_deep 4 days ago | parent | prev | next [-] | |||||||
If your model is that you trust Maven to never change anything, then sure. However, I think most people in the reproducible build space would consider Maven an external uncontrolled input. | ||||||||
| ||||||||
▲ | mystifyingpoi 4 days ago | parent | prev [-] | |||||||
I never understood this. I can delete anything from Nexus and reupload something else in its place. Is this supposed immutability just a convention that's followed? | ||||||||
|