As of tools.deps.alpha 0.9.745, when generating a pom it is possible to mark a dependency as <optional>true</optional>. This is similar to <scope>provided</scope> in that it indicates that the user of the library must arrange for the dependency to be on the classpath. However, the semantics of "optional" are more that this dependency is only sometimes needed.
This patch replaces the various hacks that marked clojupyter as provided with an indication that it is optional. This should have the desired effect of letting tooling like cljdocs load clojupyter, while still keeping clojupyter out of the dependency trees of oz users, unless they explicitly add it.
I discovered this while having similar problems with cljdocs in a different library. I had ran across some threads that led to oz and figured I'd pass along this fix.
Obviously, if you merge this, you'll want to ensure that:
You're deploying with a recent version of the Clojure CLI, so that clojure -Spom respects :optional true, and,
That I'm right that cljdocs can build while clojupyter is kept out of transitive dependencies. ;)
As of tools.deps.alpha 0.9.745, when generating a pom it is possible to mark a dependency as
<optional>true</optional>
. This is similar to<scope>provided</scope>
in that it indicates that the user of the library must arrange for the dependency to be on the classpath. However, the semantics of "optional" are more that this dependency is only sometimes needed.This patch replaces the various hacks that marked clojupyter as provided with an indication that it is optional. This should have the desired effect of letting tooling like cljdocs load clojupyter, while still keeping clojupyter out of the dependency trees of oz users, unless they explicitly add it.
I discovered this while having similar problems with cljdocs in a different library. I had ran across some threads that led to oz and figured I'd pass along this fix.
Obviously, if you merge this, you'll want to ensure that:
clojure -Spom
respects:optional true
, and,