hello folks, some help on depstar pls (edited)
clj -C:build -A:build -m hf.depstar.uberjar target/abc.jar -C -m abc.core
(edited)
this is giving me
Could not locate abc/core__init.class, abc/core.clj or abc/core.cljc on classpath.
but I have a src/abc/core.clj with (:gen-class)
some clue?
when you say it is giving you that, do you mean when you get that when building the uberjar or trying to run it?
Since you're specifying -A:build
you don't need to also specify -C:build
-- -A
means "all" so it already includes the effect of the -C
option.
What is your :build
alias in your deps.edn
@d.ian.b?
:build {:extra-deps {seancorfield/depstar {:mvn/version "1.0.94"}}}
And what exact output are you getting from that clj -A:build
command? (I'm assuming the Could not locate...
error is from trying to run the JAR?)
Compiling abc.core ...
Execution error (FileNotFoundException) at hf.depstar.uberjar/run$fn (uberjar.clj:331).
Could not locate abc/core__init.class, abc/core.clj or abc/core.cljc on classpath.
Full report at:
/tmp/clojure-5041631337400948497.edn
clj -A:build -m hf.depstar.uberjar target/abc.jar -C -m abc.core
So that says it's compiling norach.core
-- which means depstar
thinks that is the main class/namespace you told it to compile.
ops
srr
ops
it was abc.core
I've tried to anonimize =(
the names
and did it wrong
It really helps if you paste actual commands and actual error messages so you avoid transcription problems.
I just did this:
$ clj -A:new app norach.core
... creates norach.core project ...
$ cd norach.core
$ clj -Sdeps '{:deps {seancorfield/depstar {:mvn/version "RELEASE"}}}' -m hf.depstar.uberjar target/abc.jar -C -m norach.core
Compiling norach.core ...
Building uber jar: target/abc.jar
Processing pom.xml for {norach/norach.core {:mvn/version "0.1.0-SNAPSHOT"}}
$ java -jar target/abc.jar
Hello, World!
clj -A:build -m hf.depstar.uberjar target/norach.jar -C -m norach.core
Compiling norach.core ...
Execution error (FileNotFoundException) at hf.depstar.uberjar/run$fn (uberjar.clj:331).
Could not locate norach/core__init.class, norach/core.clj or norach/core.cljc on classpath.
Full report at:
/tmp/clojure-5874121970680475144.edn
So that indicates that your deps.edn
file is not setup correctly -- so norach/core.clj
is not on your classpath.
Can you run this: clj -m norach.core
Execution error (FileNotFoundException) at clojure.main/main (main.java:40).
Could not locate norach/core__init.class, norach/core.clj or norach/core.cljc on classpath.
Full report at:
/tmp/clojure-13768805695698659229.edn
=(
nope
That confirms it's not a depstar
problem -- it's a problem with your project.
thanks
You're sure you have src/norach/core.clj
and that file starts with (ns norach.core ...)
?
dammit, misstypo
ns norahc.core
dammit
thanksss
Thanks @seancorfield 😃