title: Datomic Jetty Compiler Exception (in compojure-api project)
body: <p>Clojure newbie here. I'm trying to integrate datomic into a <code>compojure-api</code> project. There is a clash on jetty, so based on the <a href="https://docs.datomic.com/cloud/troubleshooting.html#dependency-conflict" rel="nofollow noreferrer">docs</a>, my <code>project.clj</code> looks like this, which makes it work now when I do <code>lein ring server</code></p>
  
  <pre><code> (defproject dice-api "0.1.0-SNAPSHOT"
     :description "FIXME: write description"
     :dependencies [[org.clojure/clojure "1.8.0"]
                    [metosin/compojure-api "1.1.11"]
                    [com.datomic/client-pro "0.8.28"
                     :exclusions [org.eclipse.jetty/jetty-client
                                 org.eclipse.jetty/jetty-http
                                 org.eclipse.jetty/jetty-util]]]
     :ring {:handler dice-api.handler/app}
     :uberjar-name "server.jar"
     :profiles {:dev {:dependencies [[javax.servlet/javax.servlet-api "3.1.0"]]
                     :plugins [[lein-ring "0.12.0"]]}})
  </code></pre>
  
  <p>However, I can't play with datomic in the repl now(and probably, wont' work when I call it in my compojure-api endpoint).</p>
  
  <pre><code>➜  dice-api lein repl
  ...
  user=&gt; (require '[datomic.client.api :as d])
  nil
  user=&gt; (def local-cfg {:server-type :peer-server
    #_=&gt;                  :access-key "blahblahblah"
    #_=&gt;                  :secret "blahblahblah"
    #_=&gt;                  :endpoint "localhost:8998"})
  #'user/local-cfg
  user=&gt; (defn client [cfg]
    #_=&gt;   (d/client cfg))
  #'user/client
  user=&gt; (def conn (d/connect (client local-cfg) {:db-name "hello"}))
  
  CompilerException java.lang.ClassNotFoundException: org.eclipse.jetty.client.HttpClient, compiling:(cognitect/http_client.clj:1:1)
  </code></pre>
  
  <p>How can I integrate <code>datomic</code> and <code>compojure-api</code>?</p>