I don’t like running boot of lein…
I’ve been doing this with the
clj cli. You can generate dependencies and paths into your pom.xml from deps.edn by running
clj -Spom. Then run
mvn deploy. Here’s an example pom.xml file for a project I published: https://github.com/protocol55/styleguide/blob/master/pom.xml
what’s the internals behind this?
clj command there’s more information here: https://clojure.org/reference/deps_and_cli
I meant “pom” and “maven”?
Actually this is a good article to look at, jump down to “Publishing with Clojars” https://oli.me.uk/2018-02-26-clojure-projects-from-scratch/
Can’t really give more details on pom and maven since they’re rather new to me as well
- Update the version number in our
- Run the tests with
clj -Spomto update our
pom.xmlwith any dependency changes.
So if I can generate a same
pom.xml, I would be able to release to Clojars with
maven command. How about the jar file? It’s zip file of my source code. Which program handles creating jar file?
maven does. maven is the package manager for Java and everything is using it.
pom.xml is their configuration file.
FWIW just use
lein for now. Getting
mvn to work together is a lot more work and the end result will be same but a lot more complicated than just
project.clj. Plus you are trading having
lein installed for having
I already have clj and mvn on my system. I don’t have Lein since I develop ClojureScript only. And I installed Boot only for running
boot deploy at current. I would actually bare the boring steps of clj + mvn, if I can get rid of Lein and Boot. Besides, I can add scripts to reduces the steps.
You may also want to look at meyvn which is a
clj script that intends to expose some of that Maven stuff in a nice way.
Why do you have maven? I’d find it would make more sense for you to have lein rather then maven no?