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?
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
pom.xml
.- Run the tests with
clj -Atest
.- Run
clj -Spom
to update ourpom.xml
with any dependency changes.- Run
mvn deploy
.
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 deps.edn
+ clj
+ 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 clj
+ mvn
installed.
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?
This is my workflow https://github.com/Cumulo/cumulo-workflow , I use shadow-cljs, no Lein.
The bash history has lost. I can roughly recalled I installed Maven in order to debug some problem I encountered while debugging shadow-cljs. Like viewing dependency tree with Maven?
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.