I built a Continuous Deployment workflow via GitHub Actions for this Clojure project. It is a fork from a public repository.
The goal was to publish a Maven package on the GitHub Registry every time project.clj file gets tweaked (usually it is tweaked for version bumps).
It works. See the workflow running smoothly. And the package has been successfully published.
As shown on the cd.yml file, before the Deployment part on the script, there is a lein install execution on the script.
A co-worker suggested that instead of lein install the command lein uberjar should be the one being used.
According to the official documentation:
lein uberjar # package the project and dependencies as standalone jar
And lein install on the other hand:
Install jar and pom to the local repository; typically ~/.m2.
1 - Under this Maven package publishing effort context, which command should be used lein uberjar or lein install? Why?
2 - Is there any disadvantage to using lein install instead of lein uberjar? It the only downside an "overkill aspect"?
3 - Also, even if lein uberjar is the most appropriate way on GitHub Actions, if the cd.yml is being used as hard-coded documentation for other developers to replicate things locally (if needed), wouldn't it be better to have maximum reproducibility? And, hence, wouldn't lein install be the appropriate approach instead of lein uberjar?