Fork me on GitHub

Couldn’t find an answer with quick search, how does Clojars handle resolving of SNAPSHOTs with metadata identifier, for example if library has both 1.2.0-SNAPSHOT+abcd1234 and 1.2.0-SNAPSHOT+8765dcba , are they both identified as SNAPSHOTs of a specific version, 1.2.0 in this case, or entirely separate releases, and if they are seen as separate releases, which one gets priority?


I'm pretty sure that snapshot releases end in -SNAPSHOT, with no suffix. If that is true, both of those are considered distinct, non-snapshot releases. w/o the suffix, the most recent -SNAPSHOT is considered the latest. And Clojars does no resolution here, that is all done by the aether client. The only concept of priority it has by default is when you specify LATEST or RELEASE as a version. With LATEST, you'll get the most recently released version of the jar, which could be a snapshot. With RELEASE, you get the most recent non-snapshot version.


Right, I better not add that there then 🙂 This is one thing I dislike about aether, it’s obviously built in a very ad hoc manner originally so its spec is quite informal. The +something is and in lieu of not having an official way to attach additional metadata to builds this could’ve been a nice trick. So I guess instead of being lazy, I need to get back to generating a git metadata file into my resources during build which was my original plan anyways, just wanted to confirm this bit first. Thanks! 🙂


fwiw there seems to be a minor issue in resolving LATEST with a version that contains + but I have no interest in getting that to work. I’m the one who shot myself in the foot, not Clojars 🙂