leiningen

N.B. The maintainers are on #leiningen on Libera chat IRC. Go there for direct support/bug reports.
richiardiandrea 2019-05-22T18:45:37.089800Z

hello folks! is there a plugin for lein that reads the dependencies from pom.xml instead of :dependencies?

2019-05-22T19:26:51.090600Z

@richiardiandrea I don’t know of one, but would be a bit complex potentially to if the pom.xml had things like a parent and/or inheritance happening

2019-05-22T19:27:23.091300Z

along with <dependencyManagement> of versions etc - seems like you’d have to run mvn to get the list of dependencies - not just like parse an xml

2019-05-22T19:27:46.092Z

In a way, this is similar to how you can’t always just read the edn of lein project.clj, since there is profile merging, middleware, and plugins involved to get dependencies

richiardiandrea 2019-05-22T19:28:43.092700Z

yeah right, but assuming the pom.xml is simple enough...I haven't seen any plugin that does that, it might not exist then

richiardiandrea 2019-05-22T19:28:59.093100Z

just don't want to manually sync the two 😄

2019-05-22T19:29:06.093300Z

if it’s really simple. Yeah I don’t know of one. I’ve done something similar by just parsing the pom.xml before though

richiardiandrea 2019-05-22T19:31:07.093800Z

I found this, it might be useful, I am going to try that: https://gist.github.com/fogus/1990419

richiardiandrea 2019-05-22T19:31:08.093900Z

2019-05-22T19:32:25.094300Z

yeah, looks on the right track

richiardiandrea 2019-05-22T19:32:42.094500Z

Thanks a lot!

2019-05-22T19:32:59.094800Z

also, this https://github.com/thickey/lein-nevam

2019-05-22T19:33:05.095200Z

it hasn’t been worked on in a long time

2019-05-22T19:33:21.095700Z

but I remember looking at it a bit when I was trying to get info from pom’s for lein

2019-05-22T19:35:17.096200Z

hi!

2019-05-22T19:35:40.096800Z

Is it possible to parameterize the SCM url based on env vars

2019-05-22T19:36:03.097400Z

my use case is that I need to wire credentials to git within Jenkins

2019-05-22T19:36:10.097800Z

so lein release could work from there

2019-05-22T19:47:53.098100Z

@pyr should be able to with using the eval-syntax of defproject

2019-05-22T19:49:39.098800Z

(def scm (determine-scm))

(defproject my/project "1.0"...
   :scm ~scm ...)

2019-05-22T19:50:51.099800Z

I think using dispatch macro read-eval is ok too (maybe the ~ is deprecated if I recall correctly) #=(determine-scm)

2019-05-22T19:54:45.100Z

@mikerod thanks!