Fork me on GitHub
#tools-deps
<
2020-07-10
>
kenny16:07:09

Does anyone know of an up-to-date guide on deploying a jar to a private maven s3 repo? I've tried several different guides and they all reference deprecated or archived maven build plugins. It seems like such a simple task but there seems to be dozens of different ways to get it done.

kenny16:07:07

Oh interesting... it appears all I need to do is

aws s3api put-object --bucket my-bucket --key release/my-group-id/my-artifact-id/my-version/my.jar

kenny18:07:15

Actually, tools-deps does not seem completely satisfied with the above approach, printing Download corrupted: Checksum validation failed, no checksums available

kenny18:07:40

Guessing it expects some additional files in s3 that are not placed via the simple put-object action.

Drew Verlee19:07:38

If i have a lib calling a method that doesn't exist and i suspect its because two version of the lib exist and the one without it won, how can i verify this?

Drew Verlee19:07:22

the stacktrace lists the class package and class name and i compared this against the output of Stree and their isn't a direct overlap

Drew Verlee19:07:08

likley because stree is output a higher level of information

seancorfield19:07:52

@drewverlee Which lib? Which class? Which method?

Drew Verlee19:07:13

method: ""com.google.common.collect.ImmutableList.toImmutableList()Ljava/util/stream/Collector;" lib that calls it: pack/pack.alpha https://github.com/juxt/pack.alpha.git @ 0c20aa5

Drew Verlee19:07:12

well more accurately:

[{:type java.lang.NoSuchMethodError,
    :message
    "com.google.common.collect.ImmutableList.toImmutableList()Ljava/util/stream/Collector;",
    :at
    [com.google.cloud.tools.jib.builder.steps.BuildAndCacheApplicationLayerStep
     makeList
     "BuildAndCacheApplicationLayerStep.java"
     67]}]

Drew Verlee19:07:50

so google.cloud.tools.jib.builder calls com.google.common.collect.ImmutableList.toImmutableList and it doesn't exist. I assume that error isn't saying the arguments were bad in someway, its saying that method isn't there at all.

seancorfield19:07:08

And what Google libs show up in clojure -Stree for you?

seancorfield19:07:37

You may need to run clojure -Strace and see what other versions of the various Google libs were considered.

Drew Verlee19:07:37

> And what Google libs show up in clojure -Stree for you? I see guava listed under one dep i just added to my project. Is that because Stree only shows the winner of the dep merge? I suppose i'm looking for everyone that tried to add it. I'll look at Strace more carefully.

Drew Verlee19:07:21

i see Strace contains anyone that wanted to add the dep. isee it all over the place here.

seancorfield19:07:10

The output of -Strace should show you every version of every library that it considered and why it made the decision it did to pick a particular version.

seancorfield19:07:49

So you could just add a top-level dep on Guava to force a recent version, but I'm surprised tools.deps would pick a lower version, since I would expect the Google Cloud libs you're using to pull in at least that version or higher...

seancorfield19:07:04

According to Guava's docs, it's up to 28.0 now. 👀

seancorfield19:07:55

Hmm, odd, we're using 29.0 at work...

seancorfield19:07:56

21.0 is about 3 1/2 years old at this point. 29.0 came out in April this year @drewverlee

seancorfield19:07:59

We've had to pin it as a top-level dependency because other things were bringing in older versions. Java's equivalent of "DLL hell" 🙂