You can do this using leiningen profiles. For example, I have a test dependency in my :test
profile that is used for my :test
build but not for my regular build:
:cljsbuild {
:builds {
:main {...}
}}
:profiles {
:test {
:dependencies [["test-dep" "1.0.0"]]
:cljsbuild {
:builds {
:test {...}
}}}}
The test dependency is only added to the project when the test profile is active, so it won't get added to your pom.xml
file, for example, and it won't get compiled into your main build.