Fork me on GitHub

Doing something like lein ring uberwar keeps failing in my project with an exception of the form:

java.lang.AssertionError: Assert failed: (dep-spec? dep-spec)
	at leinjacker.deps$dep_name.invokeStatic(deps.clj:23)
	at leinjacker.deps$dep_name.invoke(deps.clj:23)
	at leinjacker.deps$has_dep_QMARK_$fn__9834.invoke(deps.clj:41)
	at clojure.core$some.invokeStatic(core.clj:2592)
	at clojure.core$some.invoke(core.clj:2583)
	at leinjacker.deps$has_dep_QMARK_.invokeStatic(deps.clj:41)
	at leinjacker.deps$has_dep_QMARK_.invoke(deps.clj:30)
	at leinjacker.deps$add_if_missing.invokeStatic(deps.clj:50)
	at leinjacker.deps$add_if_missing.invoke(deps.clj:43)
	at leiningen.ring.war$add_servlet_dep.invokeStatic(war.clj:223)
	at leiningen.ring.war$add_servlet_dep.invoke(war.clj:221)
	at leiningen.ring.war$war.invokeStatic(war.clj:232)
	at leiningen.ring.war$war.doInvoke(war.clj:226)
	at clojure.lang.RestFn.invoke(
	at leiningen.ring.uberwar$uberwar.invokeStatic(uberwar.clj:42)
	at leiningen.ring.uberwar$uberwar.invoke(uberwar.clj:37)
	at leiningen.ring.uberwar$uberwar.invokeStatic(uberwar.clj:40)
	at leiningen.ring.uberwar$uberwar.invoke(uberwar.clj:37)
	at clojure.lang.AFn.applyToHelper(
	at clojure.lang.AFn.applyTo(
	at clojure.core$apply.invokeStatic(core.clj:648)
	at clojure.core$apply.invoke(core.clj:641)
	at leiningen.ring$ring.invokeStatic(ring.clj:28)


I see that lein.ring.war/war attempts to automatically add more deps to project when needed


I leave those dependencies out and get this error, I try to explicitly include them to skip the problem and I still get the error


I tried this with both [lein-ring "0.12.1"] and [lein-ring "0.12.2"]


I don’t get why it’d be failing. I can’t see anything I can control in my project.clj to make this not happen


the assert failure also isn’t super informative. I wish it printed out the actual value


Figured it out. lein-ring uses leinjacker which didn’t add support to :managed-dependencies in any released version.


My project is using managed deps


So, looks like there isn’t a super graceful way to handle this other than to just not used managed deps yet.


I guess it does look like a fork may have it covered. Will try that for now.