Is it possible to specify the coursier cache location from the sbt command line?
See original GitHub issueThe code suggests this is possible, but I haven’t been able to make it work. I’ve tried
sbt -Dcoursier.cache=.coursier compile
sbt -Dcoursier.cache=/absolute/path/to/.coursier compile
sbt -Dcoursier.cache=/absolute/path/to/without/period/coursier compile
sbt -Dcoursier.cache="/lets/try/quotation/marks/coursier" compile
But the system always uses ~/.coursier instead.
Setting the coursier cache location via export (as per the README, export COURSIER_CACHE="$(pwd)/.coursier-cache"
) works as expected. Is there a reason this doesn’t?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Cache - Coursier
The cache is used to cache artifacts that don't change often (snapshot artifacts ... When using Coursier with SBT, you can check the...
Read more >changing coursier cache directory of the bundled sbt
with "C:\Users<user>\AppData\Local\Coursier\cache" being the default coursier cache location. So far, I tried to add the following to the settings > Build ...
Read more >sbt Reference Manual — Remote Caching
To abstract machine-specific paths such as your working directory and Coursier cache directory, sbt keeps a map of root paths in ThisBuild /...
Read more >scala - how can I change the coursier cache directory ...
with C:\Users\<user>\AppData\Local\Coursier\cache being the default coursier cache location. So far, I tried to add the following VM Parameters ...
Read more >coursier/coursier - Gitter
I posted what I want to achieve (pre-cache artifact with all its dependencies in docker ... Is there a way to download a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Coursier uses the COURSIER_CACHE environment variable to specify the cache. So:
export COURSIER_CACHE=some/dir sbt clean compile
@drewctaylor SBT actually uses different Java system property:
-Dsbt.coursier.home
. Look here https://github.com/sbt/sbt/blob/v1.3.1/main/src/main/scala/sbt/coursierint/LMCoursier.scala#L40-L44-Dcoursier.cache
somehow doesn’t have any effect on SBT in my case too.