Fork me on GitHub
#immutant
<
2018-08-02
>
pauld16:08:00

How does one use the clojure tools cli with immutant?

pauld16:08:36

I always get this error: IllegalArgumentException XNIO001001: No XNIO provider found org.xnio.Xnio.doGetInstance (Xnio.java:255)

pauld16:08:53

this error does not occur when using leiningen

pauld16:08:09

The error occurs when doing (web/run app) as described in the quick start / installation instructions.

tcrawley16:08:39

@pauld that sounds like a jar is missing from your classpath. Can you give more details about what you are trying to do?

pauld17:08:57

Hi, I'm just trying to use the clojure command line tools: https://clojure.org/guides/deps_and_cli

pauld17:08:55

I don't know if there is a bug in the 'clojure' command-line tool, but dependencies and classpaths are supposed to work is they do with leiningen.

pauld17:08:54

deps.edn: {:deps {org.clojure/clojure {:mvn/version "1.9.0"} org.immutant/web {:mvn/version "2.1.10"}}}

tcrawley17:08:29

Weird, it works for me.

pauld17:08:50

Strange... I get IllegalArgumentException XNIO001001: No XNIO provider found org.xnio.Xnio.doGetInstance (Xnio.java:255) when I execute your line #6

tcrawley17:08:51

I just removed xnio from my ~/.m2/repository, and now I get errors. Does clj not resolve dependencies against maven repos? This is my first use of it, and it didn't seem to do any resolution

tcrawley17:08:46

It seems like it is supposed to resolve deps

tcrawley17:08:41

ah, try rm -rf .cpcache, then run clj again

pauld17:08:54

Still same error.

pauld17:08:23

clj -Spath should show the constructed classpath

tcrawley17:08:52

Does clj -Stree show org.jboss.xnio/xnio-nio in the output?

tcrawley17:08:23

ah, the xnio-nio dep is <scope>runtime</scope> in the undertow-core pom. What version of clj do you have? Maybe older versions don't respect runtime?

tcrawley17:08:48

hmm, I don't see a way for clj to tell you its version

pauld17:08:33

yeah was wondering this too. I could just reinstall - it's fairly old

pauld17:08:05

executable is dated march 26th

tcrawley17:08:41

clj -Sverbose will give you the version. I have 1.9.0.391

pauld17:08:30

shoot I just reinstalled and it works!

pauld17:08:48

would have been nice to see the version I had

pauld17:08:04

thanks for the tips!

tcrawley17:08:33

My pleasure!