Getting started¶
Grenadine can be used as a pure Clojure library or as a standalone native command. The library is intended for Clojure dialects and tools that need Maven resolution. The command is convenient when you only need to populate a local Maven repository.
Add the library¶
Grenadine is published to Clojars as cc.clojure/grenadine:
The smallest JVM-hosted installation looks like this:
(require '[grenadine.core :as grenadine]
'[grenadine.host.jvm :as jvm])
(def result
(grenadine/install!
'{org.clojure/data.csv {:mvn/version "1.1.0"}}
{:host (jvm/host)
:mediation :tools-deps}))
(select-keys result [:classpath :fetched :cached :warnings])
install! resolves the transitive graph, downloads missing POMs and JARs,
verifies available checksums, and returns data describing the installation.
It does not mutate the JVM classpath. Dialect integrations decide how the
returned classpath or extracted source roots become loadable.
See the Library guide for the resolution pipeline and the Core API reference for every public operation.
Use the command¶
Given a deps.edn file:
an installed binary populates the standard Maven repository with:
To use another repository:
Or use a deps.edn URL:
You can also add coordinates directly. A version is optional; without one, Grenadine installs the latest Maven release:
Delete one exact version, or omit the version to delete every locally installed version of that library:
Use --remove instead when the complete expanded dependency closure should be
deleted.
Resolve and inspect a complete dependency graph without installing any JARs:
Required POMs are reused from or cached in the selected local repository. The result is a sorted list of selected coordinates. Choose another conflict mediator, or list the available strategies, with:
You can also run the latest release without installing grenadine on your PATH:
$ $(source <(curl -sL clojurestar.github.io/grenadine/get)) --add \
https://github.com/seancorfield/honeysql/blob/develop/deps.edn
Installed org.clojure/clojure 1.10.3
Installed org.clojure/core.specs.alpha 0.2.56
Installed org.clojure/spec.alpha 0.2.194
=> Installed: 3 Already: 0 Total: 3
Continue with Installation or the complete CLI reference.