-
-
Notifications
You must be signed in to change notification settings - Fork 113
Stable SNAPSHOT Identifiers
When a SNAPSHOT version is deployed to Clojars (or any other Maven repository) it is internally assigned a time-based version identifier. Whenever a new SNAPSHOT is uploaded old SNAPSHOT versions remain available under their time-based version identifier. This can be useful to avoid the pitfalls of using SNAPSHOT versions — changing dependencies without you noticing — while still being able to benefit from the latest and greatest fixes and features.
Let's assume we have a project clojars/test and deploy a snapshot 0.1.0-SNAPSHOT. Once the deploy is complete the list of versions inside the Maven repository will roughly look like this:
0.1.0-20170205.160151-1
0.1.0-SNAPSHOT (points to the above)
Now a day later we discover a bug in our SNAPSHOT and subsequently release another one:
0.1.0-20170205.160151-1
0.1.0-20170206.170424-1
0.1.0-SNAPSHOT (points to 0.1.0-20170206.170424-1)
In your project.clj or build.boot you can now use any of the below:
[clojars/test "0.1.0-20170205.160151-1"]
[clojars/test "0.1.0-20170206.170424-1"]
[clojars/test "0.1.0-SNAPSHOT"]
If you use 0.1.0-SNAPSHOT your Maven client will check for a new SNAPSHOT release once a day, potentially changing the code of a dependency you are using without you noticing. If you use one of the time-based identifiers there is no automatic updating to watch out for. This of course also means that you need to check for new versions manually.
All clojars-web wiki content licensed under a Creative Commons Attribution-ShareAlike 4.0 International License
