clojars / clojars-web

A community repository for open-source Clojure libraries
https://clojars.org
Eclipse Public License 1.0
469 stars 114 forks source link

Update clojars and leiningen deploy documentation #792

Closed tobias closed 3 years ago

tobias commented 3 years ago
seancorfield commented 3 years ago

Can we get Clojure CLI documentation this time around too?

If a project is created with clj-new, it will have depstar-based JAR creation and deps-deploy-based Clojars deployment built-in.

By the time this update goes into place, clj-new will default to behavior that is compatible with the new Clojars policy and depstar will also reference the new policy.

(this is still subject to feedback from the community once a public announcement has been made about the clojars.org policy)

tobias commented 3 years ago

We certainly can @seancorfield! We just haven't had it yet because no one has added it to the wiki page, and I've never deployed an artifact via Clojure CLI. I'll make sure we include it when I make updates.

tobias commented 3 years ago

Lein doc updates are in https://github.com/technomancy/leiningen/pull/2735.

seancorfield commented 3 years ago

Cool. I'll try to draft up a page in the Clojars' wiki for CLI/deps.edn projects and deployment this week.

tobias commented 3 years ago

Thanks @seancorfield! I added https://github.com/clojars/clojars-web/wiki/Pushing#clojure-cli, but there isn't much there. I was planning on pinging you about it since I haven't deployed with the CLI. Feel free to create a new page and link from wherever is appropriate.

seancorfield commented 3 years ago

Yeah, there are potentially a lot of options. clojure -Spom can create a minimal pom.xml file but you need to edit it to fix the group/artifact at minimum and if you want your library to be compatible with cljdoc.org you need to add a lot more to it. clj-new generates library projects with a fully-fleshed pom.xml (which you can still edit, of course). depstar can update the group/artifact/version fields in pom.xml or can just ignore it. Other JAR builders have other approaches. The depstar README shows a mvn command for deployment but also recommends deps-deploy (but of course there are other options for that too!).

seancorfield commented 3 years ago

(it may well be the weekend at this point)

seancorfield commented 3 years ago

I created https://github.com/clojars/clojars-web/wiki/Clojure-CLI-deps.edn for you to take a look. I have not yet linked to it from anywhere.

tobias commented 3 years ago

This is great, thanks @seancorfield! I linked to it from the Deploying and Tutorial pages.

tobias commented 3 years ago

I also added it to the wiki sidebar.