Fork me on GitHub
#leiningen
<
2020-04-08
>
chadhs10:04:20

are most of you adding your lein plugins to your project dev profile rather than just to a top level :plugins

paul a13:04:46

within my lein project, how would i use a non-lein project as a lein checkout? the docs (https://github.com/technomancy/leiningen/blob/stable/doc/TUTORIAL.md#checkout-dependencies) indicate that i would need to lein install the checkout in order to add the necessary files to my local maven repo, but since the checkout in question isn't a lein project, what am i to do?

paul a13:04:18

i'm trying to test changes to a dependency (which is not a lein project) in the context of a lein project; i'd like to avoid figuring out of the finer points of putting jars and pom.xml into my local maven repo

paul a13:04:16

well, i was able to glean that https://github.com/slipset/deps-deploy does something like what lein install does, although i haven't figured out a clj/deps alias that would be equivalent to lein install. i'm in place now where i'm seeing this when i try to run my code: Could not locate cljfx/api__init.class, cljfx/api.clj or cljfx/api.cljc on classpath.

paul a13:04:33

(cljfx is the non-lein project that i'm trying to use as a checkout

noisesmith15:04:58

@pclalv_clojurians lein install knows how to install things if there's a pom.xml and a jar, with some extra args it can use just a jar

noisesmith15:04:23

clj -Spom will make a pom for deps.edn

Alex Miller (Clojure team)15:04:33

if clj -Spom, you can probably tweak it, and then run mvn install

paul a18:04:36

ah, okay. @noisesmith perhaps you meant lein deploy?

noisesmith18:04:22

no, I meant lein install, it can do arbitrary artifacts

paul a19:04:21

oh huh. i don't see that and i'm on lein 2.9.2. lein install doesn't seem to accept any args or options (looking at the CLI help output), whereas lein deploy does. i was just now able to use lein deploy to put some jars into ~/.m2/repository; i'm still getting the same classpath error, but maybe i need to keep plugging away at it

Alex Miller (Clojure team)19:04:46

You can do that with mvn install

Alex Miller (Clojure team)19:04:11

It takes a bunch of args (jar file, pom file, etc)

paul a19:04:19

oh right, mvn install. somehow i didn't notice those three letters in your earlier message

paul a19:04:51

i can run mvn install without error, and it definitely adds things to my local maven repo, but something's still not right - i'm still getting the classpath-related error, Could not locate cljfx/jdk/platform__init.class, cljfx/jdk/platform.clj or cljfx/jdk/platform.cljc on classpath. the error is all but inscrutable - i'm way out of my element with these low-level java errors 😖

Alex Miller (Clojure team)20:04:56

well, first, make sure the jar is on the classpath

Alex Miller (Clojure team)20:04:20

second, make sure it has the thing you expect in it (`jar tf ....the.jar`)

paul a20:04:21

cool, i was unaware of jar tf, i'll give that a shot

noisesmith20:04:19

also a decent editor can show you what's in a jar and open documents stashed inside it

paul a20:04:46

whoa, neat

paul a20:04:03

having a visual really helps; i seem to have fixed the problem i was facing

paul a20:04:52

my thanks to both of you!