Using ions with Leiningen

Hi folks. Has anyone deployed with ions from a Leiningen project? The tutorial only describes the process with deps.edn. I’m trying to apply the same steps to my project.clj without luck.

I get the following dependency synchronization error on the ion when trying to declare ion-dev dependencies:

Could not find artifact com.datomic:ion-dev:jar:0.9.290 in central (https://repo1.maven.org/maven2/)
Could not find artifact com.datomic:ion-dev:jar:0.9.290 in clojars (https://repo.clojars.org/)
Could not transfer artifact com.datomic:ion-dev:jar:0.9.290 from/to datomic-cloud (s3://datomic-releases-1fc2183a/maven/releases): Cannot access s3://datomic-releases-1fc2183a/maven/releases with type default using the available connector factories: BasicRepositoryConnectorFactory
Could not find artifact com.datomic:ion:jar:0.9.50 in central (https://repo1.maven.org/maven2/)
Could not find artifact com.datomic:ion:jar:0.9.50 in clojars (https://repo.clojars.org/)
Could not transfer artifact com.datomic:ion:jar:0.9.50 from/to datomic-cloud (s3://datomic-releases-1fc2183a/maven/releases): Cannot access s3://datomic-releases-1fc2183a/maven/releases with type default using the available connector factories: BasicRepositoryConnectorFactory
Failed to read artifact descriptor for com.datomic:ion-dev:jar:0.9.290
Failed to read artifact descriptor for com.datomic:ion:jar:0.9.50
This could be due to a typo in :dependencies, file system permissions, or network issues.

I had no problem establishing a Datomic connection from my project and transacting to my db, so I don’t think there is a problem with my setup.

My project.clj atm:


(defproject tutorial "0.1.0-SNAPSHOT"
  :description "TESTING DATOMIC CONNECTION"
  :url "http://example.com/FIXME"
  :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
            :url "https://www.eclipse.org/legal/epl-2.0/"}
  :dependencies [[org.clojure/clojure "1.10.1"]
                 [javax.xml.bind/jaxb-api "2.4.0-b180830.0359"]
                 [com.datomic/client-cloud "0.8.113"]
                 [com.datomic/ion-dev "0.9.290"]
                 [com.datomic/ion "0.9.50"]
                 [compojure "1.6.2"]
                 [http-kit "2.5.3"]
                 [ring/ring-defaults "0.3.3"]
                 [ring/ring-json "0.5.1"]
                 [ring/ring-devel "1.9.4"]
                 [org.clojure/data.json "2.4.0"]
                 [cheshire "5.10.0"]
                 [lynxeyes/dotenv "1.1.0"]
                ]
  :repositories [["datomic-cloud" {:url "s3://datomic-releases-1fc2183a/maven/releases"}]]
  :main ^:skip-aot clojure-api.core
  :aliases { :ion-dev
            {:deps {com.datomic/ion-dev {:mvn/version "0.9.290"}}
             :main-opts ["-m" "datomic.ion.dev"]}}
  :paths ["src" "resources"]
  :target-path "target/%s"
  :profiles {:uberjar {:aot :all :jvm-opts ["-Dclojure.compiler.direct-linking=true"] :dev {:main clojure-api.core/-dev-main}}})

Any thoughts? I’m probably missing something quite obvious, but difficult to tell without seeing an example in Leiningen :slight_smile:

Alternatively, has anyone deployed an API that transacts on Datomic without ions?