How to add a hook to the uberjar process (building with a lane)

I would like to add a hook to the uberjar process. a specific example is to upload the maxmind geoip dat file to the resources folder so that the updated version is added to the jar during each deployment. examples / suggestions appreciated thanks!

+4
source share
1 answer

I recommend making a custom lein task that calls uberjar rather than using hook. For example, if your project is called foo:

file: foo/tasks/leiningen/foobuild.clj

 (ns leiningen.foobuild (:require leiningen.uberjar)) (defn foobuild [project] (download-maxmind-geoip-data) (leiningen.uberjar/uberjar project)) 

Then you can run this with:

lein foobuild

+1
source

Source: https://habr.com/ru/post/1413066/


All Articles