Fork me on GitHub

Hi, all — I’m trying to get an uberjar created of a Fulcro server application, with AOT to speed up startup time). I can start the server from clj with the given set of aliases no problem.

clj -A:dev:datomic
Clojure 1.10.3
But when I attempt to make an uberjar with those same aliases, I get a “file not found” error, even though it should be on the classpath (from the “datomic” alias). Does anyone have any ideas on what I might be doing wrong? Thank you!
clj -X:datomic:dev:uberjar :aot true :jar ./target/feedly-reader-standalone.jar \
		:main-class com.example.components.server
[main] INFO hf.depstar.aot - Compiling com.example.components.server ...
Execution error (FileNotFoundException) at com.example.components.ring-middleware/loading (ring_middleware.clj:1).
Could not locate com/example/components/parser__init.class, com/example/components/parser.clj or com/example/components/parser.cljc on classpath.

Full report at:

[main] ERROR hf.depstar.aot - Compilation failed!
Execution error (ExceptionInfo) at hf.depstar.uberjar/build-jar-as-exec (uberjar.clj:553).
AOT compilation failed


@genekim You don't want those aliases for running depstar, you want them for depstar to use to build the JAR: clj -X:uberjar :aliases '[:datomic :dev]' ...


(this is how all "tools" work for the CLI -- where you have :replace-deps so you need to tell the tool how to calculate the "basis" for manipulating the project)


@seancorfield Ohhh…. That makes so much sense. It’s working — thanks so much, @seancorfield! 🙏