November 26, 2015

How to fix Clojars all commits point to HEAD.

Recently I noticed an issue with one of the projects I deploy to Clojars. The "Pushed by with this commit" link was only ever linking back to HEAD on the GitHub repo.



This only happens when you specify an :scm key in your project.clj. Without the :scm key Leiningen will automatically discover the details from .git. I believe the :scm key was added for people using other systems, like HG.

I think there is a bug somewhere in Leiningen where the SCM info added to the artifacts pom.xml isn't generated correctly when there is an :scm key present. As soon as I removed the :scm key with this commit and did another Clojars deployment the problem was "fixed".


Tags: clojure clojars