As far as I'm aware there's no way in the tools (Lein, Maven etc) to
specify different jars per Clojure version automatically.
Myself I'd try to make the one jar work for both. As a worst case you
might be able to include two different clj files in the one jar and load
them conditionally:
(ns mylib.core)
(if (too-old? *clojure-version*)
(load "mylib/legacy.clj")
(load "mylib/current.clj"))
If that's really not possible (for example if you need to AOT compile),
you could upload them with different version numbers eg: mylib 1.4 and
mylib 1.4-clj1.2.
Unless someone has any better ideas?
Cheers,
Alex
### support details below
lein 1.x and 2.0.0-preview2 should correctly pull dependencies with a
:classifier tag.
lein 1.x pom generation always uses nil as the classifier. lein
2.0.0-preview2 will let you specify profiles which could contain
different clojure versions and a :classifier tag. However, the pom
task does not export the :dependencies/:classifier correctly based on
profile settings. I'm working on this now and plan to have this fixed
in preview3.
It looks like clojars always uses nil for the classifier when adding
the jar[2]. This will probably need to be fixed as part of issue #35
[3]. Other repositories might work.
[1] http://search.maven.org/#search|ga|38|l%3A%22jdk14%22
[2] https://github.com/ato/clojars-web/blob/master/src/clojars/maven.clj#L89
[3] https://github.com/ato/clojars-web/issues/35