Fork me on GitHub
#tools-deps
<
2018-09-04
>
pesterhazy08:09:42

Is there a better way to get a new snapshot build than rm -rf .cpcache ~/.m2/repository/com/bhauman?

delaguardo09:09:39

clj -Sforce should ignore .cpcache But why you want to delete your local maven repo?

delaguardo09:09:04

just curious

dominicm09:09:38

@pesterhazy @delaguardo I'm not certain, but I believe there is delegation to maven for this. So the usual 24h period is in place, regardless of ignoring the cpcache.

pesterhazy09:09:55

@delaguardo when a new version gets uploaded to maven, I need to download it. By deleting the local cache I make sure the files get re-downloaded

pesterhazy09:09:11

Just deleting .cpcache won't be sufficient AFAIK

dominicm09:09:20

@pesterhazy j/w, do boot/lein/mvn provide options for this?

delaguardo09:09:01

hm… you can not upload to maven new release version (without -SNAPSHOT suffix) so when maven coordinate is changed in deps.edn (e.g. 1.2.0 -> 1.2.1) it will download it. For snapshoted versions it works differently: -SNAPSHOT suffix is replaced with the timestamp and after uploading new snapshot in maven you should have two with different timestamps.

delaguardo09:09:52

all those cases already handled by tools.deps and there is no need to drop your local cache

pesterhazy09:09:39

I was clearly talking about snapshot builds in my original question, no?

pesterhazy09:09:39

let me check the timestamp theory

delaguardo09:09:56

just try with -Sforce without deleting .m2

pesterhazy09:09:04

I will, thanks!

pesterhazy09:09:53

Pretty sure that boot supports boot -u to re-download new snapshots

pesterhazy10:09:31

Wanted to check, but the web page doesn't list the command line arguments - it refers you to boot -h - and installing boot takes 5 min

delaguardo10:09:35

boot -u is for upgrading boot tool itself

pesterhazy10:09:37

Ok, it's boot -U

delaguardo10:09:59

same, but for the latest snapshot

pesterhazy10:09:53

looks like I misremembered

Alex Miller (Clojure team)10:09:58

tools.deps uses daily update strategy for SNAPSHOTs currently so won’t update new ones even with -Sforce

Alex Miller (Clojure team)10:09:28

I’m planning to change that but haven’t gotten to it yet

Alex Miller (Clojure team)10:09:20

So for the moment you would need to both delete this portion of your .m2 and use -Sforce (no need to drop ALL of your .m2 though)

Alex Miller (Clojure team)10:09:05

Or you could gen a pom with -Spom and use mvn -U dependency:tree to have Maven do it (followed by -Sforce to tell deps to update)

pesterhazy14:09:40

thanks for the explanation!

pesterhazy14:09:04

I guess rm -rf is easy enough, it's just hard to explain to others in the team