Fork me on GitHub

Hi friends! I’m new to depstar and having a bit of trouble building a library jar file. I get a FileNotFoundException and neither the message or trace are helping to narrow down the possibilities. Repo:

> clojure -X:jar :jar MyLib.jar
Execution error (FileNotFoundException) at (
-X:jar (No such file or directory)
Full exception:
 "Execution error (FileNotFoundException) at (\n-X:jar (No such file or directory)\n",
  :clojure.error/line -2,
  :clojure.error/cause "-X:jar (No such file or directory)",
  :clojure.error/source "",
  :clojure.error/phase :execution},
    :message "-X:jar (No such file or directory)",
    :at [ open0 "" -2]}],
  [[ open0 "" -2]
   [ open "" 213]
   [ <init> "" 155]
   [ <init> "" 110]
   [clojure.lang.Compiler loadFile "" 7571]
   [clojure.main$load_script invokeStatic "main.clj" 475]
   [clojure.main$script_opt invokeStatic "main.clj" 535]
   [clojure.main$script_opt invoke "main.clj" 530]
   [clojure.main$main invokeStatic "main.clj" 664]
   [clojure.main$main doInvoke "main.clj" 616]
   [clojure.lang.RestFn applyTo "" 137]
   [clojure.lang.Var applyTo "" 705]
   [clojure.main main "" 40]],
  :cause "-X:jar (No such file or directory)"}}
Any ideas or pointers would be much appreciated :)


@adamtait Your clojure CLI is too old. Run clojure -Sdescribe to see what version you have installed.


Per the depstar README: > Note: these instructions assume you have at least version of the Clojure CLI installed. See Clojure Tools Releases for details about the functionality in recent CLI releases. is the link for Clojure Tools Releases


The current stable version is Support for -X was added back in October last year.


The symptom is -X:jar (No such file or directory) — which says the clojure script tried to run the first argument (as a Clojure script) because it didn’t recognize it as an option. The stacktrace shows this error is not coming from depstar.


Thanks much! Upgrading clojure CLI did the trick. Somehow I read that but didn’t think I might have an old version.


(I’m currently testing which is a prerelease with the new multi-exec function support that Alex talked about at clojureD last week 🙂 )

clojure-spin 3
👍 3