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?

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top