I've created a build that I want to run with
clj -T:build build
Can I add the dependencies from the dev alias to that or do I need to declare them again in the build alias?
Seems so. Oh well.
If I have a dependency with a version of "LATEST" or "RELEASE", how often (if at all) does the CLI check for/download a new version when run?
I'm assuming for the CLI, if I use -Sforce it always checks and picks up any new version but, without that, is it just cached "forever"?
(I only use these for dev tooling)
From a tools.deps perspective, the default is daily: https://github.com/clojure/tools.deps/blob/f2c3798cffd426ddf4031944d6bf5e6bea45ae47/src/main/clojure/clojure/tools/deps/util/maven.clj#L113
the cache becomes stale if something changes. a version of "LATEST" or "RELEASE" is the literal string "LATEST" or "RELEASE", which never changes, and thus never invalidates the cache
if you use -Sforce, you are recomputing the classpath and you are then subject to whatever the update frequency of the repo is, by default daily
Thanks, both. I periodically use -Sforce with -P to "reset" things so that all sits right with my expectations.
This came up for me because the NIST NVD APIs have been timing out a lot and the dependency check library was updated (to 10.0.2) and they issued a "mandatory update notice" because earlier versions were spamming their servers (due to a bug in the retry code) -- I run some tasks directly from the CLI and some via tools.deps in our build.clj, so I just wanted to check when/if I needed to "intervene" with -Sforce.
you can also peep the ~/.m2/repository/GROUP/ARTIFACT/maven-metadata-local.xml to check it's lastUpdated timestamp (and compare to the resolver-status.properties there)
Thanks, I have a better understanding now, too!