Question

When I run lein jar, it will package my resource files in src/resources, but i expect to modify some config files after packaged. So the resource files should be exclude when lein jar, but how?

Was it helpful?

Solution

One way would be to use :jar-exclusions or :uberjar-exclusions in project.clj to exclude your config files:

;; to exclude all .conf files from jars:
:jar-exclusions [#".*\.conf"]

You could also simply not put those files in the resources directory and tell your application where to look for them using, say, an environment variable.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top