fix up project profiles a bit and adjust some build settings

separate out the uberjar profile so that the bits that control the
classpath are in a separate profile (now called "release") which can
be more easily brought in separately during development to test, without
being forced to build an uberjar to test

remove the uberjar alias, which only was added because i did not
realize that leiningen by default automatically does a clean before
building a jar (???)
This commit is contained in:
Gered 2021-12-22 18:24:02 -05:00
parent 179e484bd7
commit 417e9e29ff
2 changed files with 16 additions and 12 deletions

View file

@ -15,16 +15,20 @@
:main {{root-ns}}.core :main {{root-ns}}.core
:repl-options {:init-ns {{root-ns}}.core} :repl-options {:init-ns {{root-ns}}.core}
:target-path "target/%s/"
:profiles {:dev {:source-paths ["env/dev/src"] :profiles {:dev {:source-paths ["env/dev/src"]
:resource-paths ["env/dev/resources"] :resource-paths ["env/dev/resources"]
:dependencies [[pjstadig/humane-test-output "0.11.0"]] :dependencies [[pjstadig/humane-test-output "0.11.0"]]
:injections [(require 'pjstadig.humane-test-output) :injections [(require 'pjstadig.humane-test-output)
(pjstadig.humane-test-output/activate!)]} (pjstadig.humane-test-output/activate!)]}
:uberjar {:source-paths ["env/prod/src"] :release {:source-paths ["env/release/src"]
:resource-paths ["env/prod/resources"] :resource-paths ["env/release/resources"]}
:omit-source true
:aot :all}}
:aliases {"uberjar" ["do" ["clean"] ["uberjar"]]}) :release/uberjar {:omit-source true
:aot :all}
:uberjar [:release :release/uberjar]}
)

View file

@ -16,8 +16,8 @@
data data
"env/dev/resources" "env/dev/resources"
"env/dev/src" "env/dev/src"
"env/prod/resources" "env/release/resources"
"env/prod/src" "env/release/src"
["resources/logback.xml" (render "resources/logback.xml" data)] ["resources/logback.xml" (render "resources/logback.xml" data)]
["src/{{root-ns-path}}/core.clj" (render "src/root_ns/core.clj" data)] ["src/{{root-ns-path}}/core.clj" (render "src/root_ns/core.clj" data)]
["test/{{root-ns-path}}/core_test.clj" (render "test/root_ns/core_test.clj" data)] ["test/{{root-ns-path}}/core_test.clj" (render "test/root_ns/core_test.clj" data)]