Main-Class set in manifests of {{target/clojure.jar}} (or jars in Maven repository) gives impression, that they can be run as standalone JAR-packaged applications.
However running them with
`
java -jar clojure-${version}.jar`
results in
`
Exception in thread "main" java.lang.ExceptionInInitializerError
at clojure.main.<clinit>(main.java:20)
Caused by: Syntax error compiling at (clojure/main.clj:1:1).
at clojure.lang.Compiler.load(Compiler.java:7647)
...
... 1 more
Caused by: java.io.FileNotFoundException: Could not locate clojure/spec/alpha__init.class, clojure/spec/alpha.clj or clojure/spec/alpha.cljc on classpath.
at clojure.lang.RT.load(RT.java:466)
at clojure.lang.RT.load(RT.java:428)
`
(It of course works perfectly fine for top-level {{clojure.jar}} built in local profile with dependencies shaded.)
Yet, for {{java -jar}} classpath cannot be modified in command line ({{-cp}} is ignored), only as Class-Path entries in manifest.
I'd prefer to see clean
`
no main manifest attribute...`
reported by {{java}} rather than {{ExIIError}} and stack trace in such case.
Screened by: Alex Miller - correctly builds normal Clojure without a main class, but continues to build local jar with a main (that one includes the spec deps).