leiningen

Marius 2022-06-13T13:53:16.366199Z

Hey there! I have a mixed project with Clojure(Script) and Java, located in src/clj, src/cljs and src/java. Leiningen is configured with :java-source-paths ["src/java" "test/java"] . So far so good. When running lein javac, a ClassNotFound exception is thrown because the Clojure code is compiled first and fails to locate the Java .class. When I remove all references to Java from my Clojure code, I can run lein javac, and afterwards compile the (restored) Clojure code. Of course I’d like to avoid that step. Is there any way I can make Leiningen compile the Java code first (which is self-contained; does not have a reference to Clojure code)?

2022-06-13T22:26:59.090879Z

@mail990 have you tried adding the java source to the normal :source-paths

2022-06-13T22:27:16.976849Z

javac is a built-in :prep-tasks I believe.

2022-06-13T22:27:41.158129Z

I'd probably need to see your project.clj layout beyond that