i would like to add a hook to the uberjar process. the specific example is to download the maxmind geoip dat file into the resources folder so an updated version is bundled into the jar every time it deploys. examples/suggestions appreciated thanks!
Asked
Active
Viewed 649 times
4
-
1Take a look at the [guide for implementing a hook](https://github.com/technomancy/leiningen/blob/preview/doc/PLUGINS.md#hooks). – Jeremy May 18 '12 at 17:43
1 Answers
0
I recommend making a custom lein task that calls uberjar, rather than using a 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

Aaron Iba
- 625
- 5
- 14