Is it possible to generate cljdocs for a library on Maven central?
Yeppers! Most Clojure libs are on clojars, we handle those automatically. We special-case Maven central Clojure libs. If you give me the Clojure group-id/artifact-id(s), we'll ensure they appear in the cljdoc lib search.
https://central.sonatype.com/artifact/xyz.triplox/triplox/versions I originally had it on Clojars, but also wanted to publish a Java library so switched to Maven. I hope that doesn't create any issues. Thanks.
Not a problem at all.
Ah. Interesting. I don't think I've handled the case of a lib that is on both clojars and maven-central before. I expect you'd want cljdoc to only find the maven-central version? I don't see anything public depending on your lib on clojars. Would it be a good idea to request a delete of the lib from clojars?
Yes. Any old references to clojars shouldn't matter. Just point it to Maven or does the overlap create an issue?
I can request a deletion, but nobody should or likely will depend on those old versions. It's all very alpha and I am just preparing for a proper release.
Cljdoc doesn’t yet handle the case of a lb in both Maven central and clojars for lib search. I can take a peek. But… other tooling might have subtle problems. What if someone deps on RELEASE for example, will folks get Maven or clojars?
Clojars will forbid releases that are on Maven. I am not even able to publish to clojars anymore.
I started off with clojars and then stopped deploying to it when I switched to Maven.
Yes but won’t tools deps and lein still find your old versions there?
Do you mean that the older releases on clojars are a problem for newer releases on Maven, like tools.deps thinks that there is no version X because the latest is X-5 on clojars?
I don't think that is an issue. If it makes your life easier I can ask for a deletion on Clojars.
I was just wondering how lein and tools deps handle a RELEASE dep like this deps.edn:
{:deps {xyz.triplox/triplox {:mvn/version "RELEASE"}}}
Just tried for tools deps and it seemed to be smart enough to choose Maven central.
I'll go ahead and adjust cljdoc doc to handle this scenario.BTW, although cljdoc search won't yet find your lib from Maven Central. If you specify the URL, it will bring up your docs: https://cljdoc.org/d/xyz.triplox/triplox/0.1.0-alpha.5.
Ah awesome, that is already great, thanks.
I assume latest will work once you have done your magic.
Pushed a change, search should find your lib on maven central now. And cljdoc badge, if you use it, should be correct now.