Fork me on GitHub
#tools-deps
<
2020-04-01
>
pez08:04:10

What is the equivalent of Leiningen's :local-repo "local-m2" in deps.edn?

delaguardo08:04:28

:mvn/local-repo key

pez08:04:15

It doesn’t seem to work as I expect it to. I don’t know what to put as the url.

Alex Miller (Clojure team)12:04:57

It takes a string (a path)

Alex Miller (Clojure team)12:04:50

Which can be either relative or absolute

pez12:04:59

Thanks. I shall experiment some more, maybe I am not looking at the right places for the right result... Also, right now I'm using lein-tools-deps so maybe that complicates things.

Alex Miller (Clojure team)12:04:55

This seems wrong as it is relative to the current directory. So if you are sharing it, you need an absolute path

cursork11:04:58

I think I'm just having a stupid moment... But I'm not sure where I can use :jvm-opts in deps.edn . I'm currently using it in a dev alias and calling clj -A:dev which works fine. But the entire purpose of this code is to interoperate via JNI to an underlying dynamic lib, so ideally I'd like to have :jvm-opts ["-Djava.library.path=..."] always be set to a path I control. Using System/setProperty doesn't seem to have an effect as I guess the initial java.library.path at startup is used. Is the only option to have an alias for the path, and always invoke it? And then other aliases as usual?

cursork11:04:27

Maybe I'm answering my own question... If there's a .dylib or .so I'm expecting to use, the location should be specified for each env it's deployed on. As it could be different between developer's machines as well. So maybe we all have a ~/.clojure/deps.edn with some profile with the correct path. A common name of :shared-libs or something might make that easy to work with.

kszabo11:04:47

yeah, jvm-opts only works with aliases

cursork11:04:32

Thanks for the confirmation 🙂