asciidoctor-gradle-plugin icon indicating copy to clipboard operation
asciidoctor-gradle-plugin copied to clipboard

Could not find com.burgstaller:okhttp-digest:1.10.

Open HungUnicorn opened this issue 1 year ago • 10 comments

Error:

   > Could not find com.burgstaller:okhttp-digest:1.10.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/com/burgstaller/okhttp-digest/1.10/okhttp-digest-1.10.pom
       - https://plugins.gradle.org/m2/com/burgstaller/okhttp-digest/1.10/okhttp-digest-1.10.pom
       - https://jitpack.io/com/burgstaller/okhttp-digest/1.10/okhttp-digest-1.10.pom
     Required by:
         project : org.asciidoctor.jvm.gems:org.asciidoctor.jvm.gems.gradle.plugin:3.3.2 > org.asciidoctor:asciidoctor-gradle-jvm-gems:3.3.2 > com.github.jruby-gradle:jruby-gradle-core-plugin:2.0.2 > io.github.http-builder-ng:http-builder-ng-okhttp:1.0.3

The artifact has moved from jcenter to maven central! The coordinates have changed from

com.burgstaller:okhttp-digest: to io.github.rburgst:okhttp-digest:

https://github.com/rburgst/okhttp-digest

Can we update it?

HungUnicorn avatar Jun 23 '23 08:06 HungUnicorn

Also 1.10 seems to be really outdated.

MderM avatar Jun 23 '23 09:06 MderM

IN the meantime at the top of your build.gradletry to do

buildscript.configurations.classpath.resolutionStrategy.force( 'com.burgstaller:okhttp-digest:1.10', 'io.github.rburgst:okhttp-digest:3.0.1')

ysb33r avatar Jun 23 '23 18:06 ysb33r

I appreciate the workaround @ysb33r. I was just dropping in to make sure this issue was reported.

It turns out Jcenter was offline some the past couple days, which highlighted what @HungUnicorn reported. FWIW, I've filed the following ticket documenting that fact and a little more with jruby-gradle-plugin.

https://github.com/jruby-gradle/jruby-gradle-plugin/issues/445

sidesho96 avatar Jun 24 '23 23:06 sidesho96

Same issue here as of today. The central maven repository no longer has this artifact. Which plugin versions can I use that does not have this dependency? Previously it was quite challenging to get a working setup, not all versions are aligned / compatible...

id 'org.asciidoctor.jvm.gems' version '3.3.2'
id 'org.asciidoctor.jvm.convert' version '3.3.2'
id 'org.asciidoctor.jvm.pdf' version '3.3.2'

asciidoctorj { modules { pdf { version '1.5.3' } diagram { version '2.0.2' } } }

pdorrestijn avatar Jul 17 '24 13:07 pdorrestijn

So I tried 4.0.2 and it has similar issues :( org.asciidoctor.jvm.gems:org.asciidoctor.jvm.gems.gradle.plugin:4.0.2 > org.asciidoctor:asciidoctor-gradle-jvm-gems:4.0.2 > org.ysb33r.gradle.jruby:jrubygradle-resolver:1.0.1 > io.github.http-builder-ng:http-builder-ng-okhttp:1.0.3

pdorrestijn avatar Jul 17 '24 13:07 pdorrestijn

using the build scan plugin and override the dependency doesn't seem to help either (or maybe I'm not doing it right, not sure as I never really had to do this and seems not fit for automated builds either)...

pdorrestijn avatar Jul 17 '24 13:07 pdorrestijn

I just added another url/repository (https://archiva-repository.apache.org/archiva/repository/public/ ) in the repositories block inside my gradle.build file. image

When I did this, the:

Could not find com.burgstaller:okhttp-digest:1.10.
    Searched in the following locations:
      - https://repo.maven.apache.org/maven2/com/burgstaller/okhttp-digest/1.10/okhttp-digest-1.10.pom
      - https://plugins.gradle.org/m2/com/burgstaller/okhttp-digest/1.10/okhttp-digest-1.10.pom
      - https://jitpack.io/com/burgstaller/okhttp-digest/1.10/okhttp-digest-1.10.pom
    Required by:
        project : org.asciidoctor.jvm.gems:org.asciidoctor.jvm.gems.gradle.plugin:3.3.2 > org.asciidoctor:asciidoctor-gradle-jvm-gems:3.3.2 > com.github.jruby-gradle:jruby-gradle-core-plugin:2.0.2 > io.github.http-builder-ng:http-builder-ng-okhttp:1.0.3

error message didn't surface again as this repository contains the okhttp dependency that is required.

MarkBenjaminKatamba avatar Jul 26 '24 09:07 MarkBenjaminKatamba

@MarkBenjaminKatamba your fix worked for me as well, thank you so much for sharing! 🙌

manubete avatar Aug 04 '24 01:08 manubete

I just added another url/repository (https://archiva-repository.apache.org/archiva/repository/public/ ) in the repositories block inside my gradle.build file. .. error message didn't surface again as this repository contains the okhttp dependency that is required.

I tried the same as we have the same problems but unfortunately it doesn't help as our build job seems to ignore the archive repo. What can I do to force the build to lookup in the archive repo?

daniela-hesse-fnt avatar Aug 13 '24 07:08 daniela-hesse-fnt

To be a bit more specific than the previous answer: One needs to add the repository to the settings.gradle file, e.g., as

pluginManagement {
    repositories {
        gradlePluginPortal()
        // https://github.com/asciidoctor/asciidoctor-gradle-plugin/issues/679#issuecomment-2252292062
        maven {
            url "https://archiva-repository.apache.org/archiva/repository/public/"
        }
        mavenCentral()
    }
}

vinjana avatar Sep 24 '24 11:09 vinjana