Fork me on GitHub

I am trying to create uberjar for my deps.edn project. i must be doing something wrong but when i run

clj -T:build uber :aot true 
i get
-T is no longer supported, use -A with repl, -M for main, or -X for exec
Am i using outdated cli or something? I am using this lib and i see the -T being used


I think you might have an older version of the CLI tools. What do you get if you run clj --version?


WARNING: When invoking clojure.main, use -M
Execution error (FileNotFoundException) at (
--version (No such file or directory)

Full report at:


I fail to recall the old command for checking the version of your Clojure CLI but after the upgrade clojure --version should give you something like Clojure CLI version edit: I think it was clojure -Sversion but that doesn't seem to work anymore


yeah now it does! I managed to use -T

👍 1

clojure -Sdescribe will show the version of the Clojure CLI tool along with the paths it uses, so quite a useful tool clojure -Sverbose will show the same info, but also run a REPL or clojure code as well, so useful for debugging classpaths and other issues

🙏 1

Oh right, I was thinking of -Sdescribe, thanks

👍 1

is it bad to want to have a way to chain multiple -X call in the same process (a bit like lein do ...?


clj -X:foo bar -X:baz quuq ...


I guess it becomes a bit ambiguous (-X arg vs -X invocation)


and classpath isolation would come up I suppose


For a while it was possible to chain calls but that was removed because of exactly those sorts of issues. Write functions to do the chaining and then you have control of that. See build.clj for example.


it's easy to emulate other ways, it's not so easy when it wants to be dynamic (in the user controlled sense)


anyway, I am fine without it, I was just curious

Alex Miller (Clojure team)15:04:45

if you want a program, write a program, and call that :)

Alex Miller (Clojure team)15:04:13

if you want a dynamic program, there's this cool thing called a REPL :)


☝️:skin-tone-2: That is why I mostly run our build.clj as a REPL instead of a set of tasks to invoke from the CLI:

(! 543)-> clj -M:build -i build.clj -r
Clojure 1.11.1
user=> (-> {} (build/cold-start) (build/all-tests-ci))


(I can also do clojure -T:build some-task :the '"args"' when I need something running standalone elsewhere)


Most build tasks are quite static for us anyway, you never run them manually (ci/cd does the work).


For the rest we re trying to standardize profile names for common aliases across repos to lower the learning curve


We have all sorts of useful stuff in our build.clj script for local dev/test work -- as well as several for CI/CD automation.


@seancorfield I recently added a :dev alias to a project where I added "." to the classpath, so I could do:

clojure -A:build:dev
and just develop tools build from the REPL in addition to the rest


We already have a :dev alias for other reasons (Polylith) but I do often add :build when starting a REPL so I can work on build.clj as well as everything else 🙂


another workaround (hack) I sometimes do is clj -Scp $(clojure -Spath -A:build):$(clojure -Spath -A:whatever-else):. , works as well ;)

👀 2