Use tools deps for testing and lein for packaging

It seems packaging the project as a jar for library use is difficult
using tools deps. There is only one tool that does this, meyvn, which
insists on collecting data about usage to be able to sell enterprise
licenses to heavy users. Not a very attractive feature. It also depends
on maven for secrets handling which means using maven's security setup
with encrypted passwords in the maven config file and a master password
rather than a gpg-encrypted edn file like leiningen and boot.

In sum I think using leiningen to package the library is preferable. We
can use the tools deps plugin for leiningen to fetch dependencies listed
in the deps.edn file. Publishing the library to should be
done locally from developer machines (to sign package with gpg), so
having both leiningen and tools deps installed should be no problem.
Signed-off-by: Snorre Magnus Davøen's avatarSnorre Magnus Davøen <>
parent 9c23d265
Pipeline #13772 passed with stage
in 36 seconds
......@@ -16,6 +16,7 @@ after_script:
image: clojure:lein-alpine
image: clojure:tools-deps-alpine
- lein test
- clojure -Atest
- clojure -Apropertytest
# clj-jwt
![clj-jwt logo](./clj-jwt.png)
A Clojure library to handle validation of JWTs.
The library exposes functions to handle validation of JSON web tokens. It wraps

4.56 KB

{:paths ["src"]
{:paths ["src" "resources"]
:deps {org.clojure/clojure {:mvn/version "1.9.0"}
buddy/buddy-core {:mvn/version "1.5.0"}
buddy/buddy-sign {:mvn/version "3.0.0"}
org.clojure/data.json {:mvn/version "0.2.6"}
org.clojure/algo.generic {:mvn/version "0.1.3"}
invetica/uri {:mvn/version "0.5.0"}}}
invetica/uri {:mvn/version "0.5.0"}}
:aliases {:test {:extra-paths ["test" "test-resources"]
:extra-deps {com.cognitect/test-runner {:git/url ""
:sha "028a6d41ac9ac5d5c405dfc38e4da6b4cc1255d5"}
org.clojure/test.check {:mvn/version "0.9.0"}
clj-time {:mvn/version "0.14.4"}
clojure-term-colors {:mvn/version "0.1.0"}}
:main-opts ["-m cognitect.test-runner"]}
:propertytest {:extra-deps {org.clojure/test.check {:mvn/version "0.9.0"}
clj-time {:mvn/version "0.14.4"}
clojure-term-colors {:mvn/version "0.1.0"}}
:extra-paths ["test" "test-resources"]
:main-opts ["-m exerciser"]}
:jar {:extra-deps {luchiniatwork/cambada {:mvn/version "1.0.0"}}
:main-opts ["-m" "cambada.jar"]}}}
(defproject no.nsd/clj-jwt "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:description "A Clojure library to fetch json web keys and validate json web tokens. Wraps Buddy."
:url ""
:license {:name "Eclipse Public License"
:url ""}
:middleware [lein-tools-deps.plugin/resolve-dependencies-with-deps-edn]
:plugins [[lein-tools-deps "0.4.1"]]
:lein-tools-deps/config {:config-files [:project]}
:profiles {:test {:resource-paths ["test-resources"]
:dependencies [[org.clojure/test.check "0.9.0"]
[clj-time "0.14.4"]
[clojure-term-colors "0.1.0"]]}})
:lein-tools-deps/config {:config-files [:project]})
(ns no.nsd.exerciser
(ns exerciser
(:require [no.nsd.clj-jwt]
[buddy.core.keys :as keys]
[buddy.sign.jwt :as jwt]
......@@ -109,7 +110,27 @@ vLu9XxKFHYlWPccluz3pqDfaGNPO12968DAldwvAV6hTGgx7oMaNPu0UltgD/aaj
(exercise-ns 'no.nsd.clj-jwt)
(defn -main
[& args]
(doseq [ns ['no.nsd.clj-jwt]]
(let [res (exercise-ns ns)
successes (or (:check-passed res) 0)
fails (+ (or (:check-failed res) 0)
(or (:check-threw res) 0))]
(if (pos? fails)
(do (when (pos? successes)
(println (green (str successes
" function"
(when (not= 1 successes) "s")
" successfully exercised"))))
(println (red (str fails
" function"
(when (> fails 1) "s")
" failed\n")))
(System/exit 1))
(println (green (str successes
" function"
(when (not= 1 successes) "s")
" successfully exercised\n"))))))
(System/exit 0))
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment