Closed tobias closed 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.
username/project
will assume https://github.com/username/project and a group/artifact of org.clojars.username/project
and a main namespace of username.project
.com.github.username/project
will assume https://github.com/username/project and a group/artifact of com.github.username/project
and a main namespace of username.project
.io.github.username/project
, com.gitlab.username/project
, and io.gitlab.username/project
. com.acme/project
will assume https://github.com/com.acme/project (and will likely need adjusting) and a group/artifact of com.acme/project
and a main namespace of com.acme.project
.(this is still subject to feedback from the community once a public announcement has been made about the clojars.org policy)
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.
Lein doc updates are in https://github.com/technomancy/leiningen/pull/2735.
Cool. I'll try to draft up a page in the Clojars' wiki for CLI/deps.edn
projects and deployment this week.
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.
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!).
(it may well be the weekend at this point)
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.
I also added it to the wiki sidebar.