Fork me on GitHub
#shadow-cljs
<
2023-12-28
>
hoppy18:12:25

what are the current best practices for dealing with CI setups where I want to not have to download dependencies for every build. Shorter, but related, is there a process that allows me to relocate the maven local repository elsewhere, where I could presumably poplulate it? I'm having zero luck with things like [export MAVEN_OPTS=-Dmaven.repo.local=/tmp/maven_repo] having any effect.

Nundrum19:12:26

Advice might be wildly different based on which CI system you're using. But here are some thoughts that might be helpful: • Use something like Archiva to mirror/proxy the upstream resources • If the build is in a container, mount the external repo folder • Perhaps something as simple as replacing the repo folder with a symlink to a central location?

thheller19:12:37

yeah kinda hard to answer without knowing specifics about your CI system

thheller19:12:46

in general archiving ~/.m2 is an option

thheller19:12:25

if you are just using shadow-cljs.edn (i.e. no lein/deps.edn) you can set :maven {:local-repo "maven"} in shadow-cljs.edn to have the files in the project dir directly

hoppy20:12:23

thanks, {:maven {:local-repo}} is exactly what I was needing, but not finding, in the docs.

phill01:12:52

Be mindful that if Maven invocations run concurrently they might trip over each other and trash the local-repo.

hoppy01:12:40

interesting. probably not a player in this case, but I'm curious as to why this would be any different than just ~/.m2/repository ?

phill02:12:36

It isn't. If you run two Maven processes sharing the same ~/.m2/repository, bad things may happen.