@mikerod Yes, in my actual project I have issue with uberjar as well. And I am able to fix it by defining exactly as you mentioned in the :uberjar profile. However, similar fixes doesn't work for dev repl.
If you look at the example project I provided, the interesting part is, if the line routes/home.clj:6
is commented out, running lein repl
would show the log output as it compiles the java file. Please check the gist (https://gist.github.com/lsyoyo/14b3d5c0490fb73ea2c3987361ef8c2f) for output when I run lein pprint | grep -C 5 prep-tasks
in the example project. From the output it shows, the default one with ["javac" "compile"]
is till there in spite of the one explicitly mentioned in cljsbuild profile.
@lin.subscriber do you see a :compile-path
in your pprint
?
The javac
classfile results should go there, and that should be put onto your classpath prior to the next steps.
I believe you are saying that the lein repl
fails with an error that the class is missing com.test.TestError. This happens while compiling the clj namespace that refers to it correct?
You may want to try lein javac
first, then lein repl
to see if you see different behavior as well.