Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to omit resources directory when using lein uberjar

I am building a MIDI application with Clojure and Leiningen, and I am including some example MIDI files in the resources directory for testing on the REPL. However, I would like to exclude these resources when using lein uberjar. I am not sure if this is possible, or if the best place for test files such as these is in the resources directory. I couldn't find anything specific to this... is there a way to exclude with uberjar-exclusions in project.clj?

like image 840
dtg Avatar asked Sep 11 '25 01:09

dtg


1 Answers

The correct approach to your problem would be to have a separate resource directory for development purposes, and have it configured separately in your dev profile in leiningen.

 :profiles {:dev {:resource-paths ["dummy-data"] ...

Remember settings get merged into existing ones, so you don't need to specify the standard resources path.

Look at the sample project here, and profiles doc here.

like image 173
guilespi Avatar answered Sep 13 '25 01:09

guilespi