get docker uberjar working
This commit is contained in:
parent
4acc4e2201
commit
c28c398a14
9 changed files with 91 additions and 27 deletions
25
build.clj
Normal file
25
build.clj
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
(ns build
|
||||
(:require [clojure.tools.build.api :as b]))
|
||||
|
||||
(def lib 'snippets)
|
||||
|
||||
(def class-dir "target/classes")
|
||||
(def uber-file (format "target/%s-standalone.jar" (name lib)))
|
||||
|
||||
;; delay to defer side effects (artifact downloads)
|
||||
(def basis (delay (b/create-basis {:project "deps.edn"})))
|
||||
|
||||
(defn clean [_]
|
||||
(b/delete {:path "target"}))
|
||||
|
||||
(defn uber [_]
|
||||
(clean nil)
|
||||
(b/copy-dir {:src-dirs ["src" "resources"]
|
||||
:target-dir class-dir})
|
||||
(b/compile-clj {:basis @basis
|
||||
:ns-compile '[snippets.main]
|
||||
:class-dir class-dir})
|
||||
(b/uber {:class-dir class-dir
|
||||
:uber-file uber-file
|
||||
:basis @basis
|
||||
:main 'snippets.main}))
|
||||
Loading…
Add table
Add a link
Reference in a new issue