Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JCenter kills doctoolchain, as Grolifant is not available on Maven Central #1200

Closed
obfischer opened this issue Jun 23, 2023 · 16 comments · Fixed by #1201
Closed

JCenter kills doctoolchain, as Grolifant is not available on Maven Central #1200

obfischer opened this issue Jun 23, 2023 · 16 comments · Fixed by #1201

Comments

@obfischer
Copy link

Describe the bug
Since some days, I am unable to build our CI/CD image, as the dependency org.ysb33r.gradle:grolifant:0.12.1 is no longer available.

#35 [stage-1 26/31] RUN JAVA_HOME=/opt/dtcw/.doctoolchain/jdk/ /opt/dtcw/.doctoolchain/docToolchain-2.2.1/bin/doctoolchain .     exportOpenApi
#35 sha256:1555dd44d7cf8a3ed225331f5639d541944d38400557563e367e1ad02f429470
#35 3.599
#35 3.599 Welcome to Gradle 6.9.2!
#35 3.599
#35 3.601 Here are the highlights of this release:
#35 3.601  - This is a small backport release.
#35 3.602  - Java 16 can be used to compile when used with Java toolchains
#35 3.603  - Dynamic versions can be used within plugin declarations
#35 3.603  - Native support for Apple Silicon processors
#35 3.603
#35 3.604 For more details see https://docs.gradle.org/6.9.2/release-notes.html
#35 3.604
#35 4.436 Starting a Gradle Daemon (subsequent builds will be faster)
#35 64.54
#35 64.54 FAILURE: Build failed with an exception.
#35 64.54
#35 64.54 * What went wrong:
#35 64.54 A problem occurred configuring root project 'docToolchain'.
#35 64.54 > Could not resolve all artifacts for configuration ':classpath'.
#35 64.54    > Could not find org.ysb33r.gradle:grolifant:0.12.1.
#35 64.54      Searched in the following locations:
#35 64.54        - https://plugins.gradle.org/m2/org/ysb33r/gradle/grolifant/0.12.1/grolifant-0.12.1.pom
#35 64.54      If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
#35 64.54      Required by:
#35 64.54          project : > org.asciidoctor.convert:org.asciidoctor.convert.gradle.plugin:2.4.0 > org.asciidoctor:asciidoctor-gradle-jvm:2.4.0
#35 64.54          project : > org.asciidoctor.convert:org.asciidoctor.convert.gradle.plugin:2.4.0 > org.asciidoctor:asciidoctor-gradle-jvm:2.4.0 > org.asciidoctor:asciidoctor-gradle-base:2.4.0
#35 64.54
#35 64.54 * Try:
#35 64.54 Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
#35 64.55
#35 64.55 * Get more help at https://help.gradle.org
#35 64.55
#35 64.55 BUILD FAILED in 1m 3s
#35 ERROR: executor failed running [/bin/sh -c JAVA_HOME=/opt/dtcw/.doctoolchain/jdk/ /opt/dtcw/.doctoolchain/docToolchain-2.2.1/bin/doctoolchain .     exportOpenApi]: exit code: 1

Looking at https://plugins.gradle.org/m2/org/ysb33r/gradle/grolifant/ you will get the message, that JCenter no longer serves files but redirects to Maven.... But on Maven Central is only version 0.16.1 available.

To Reproduce
Steps to reproduce the behavior:

  1. Use a fresh install of docToolchain
  2. Run the task exportOpenAPI
  3. See error

Expected behavior
Task exportOpenAPI succeeds, as all dependencies are available

@RoxoElb
Copy link

RoxoElb commented Jun 23, 2023

Just encountered exactly the same problem.
The only available version of grolifant is https://repo1.maven.org/maven2/org/ysb33r/gradle/grolifant/0.16.1/

@obfischer
Copy link
Author

Here is the reason:

grafik

@rdmueller
Copy link
Member

it seems that Gradle is aware of the problem:
https://status.gradle.com/?utm_source=embed

@obfischer
Copy link
Author

obfischer commented Jun 23, 2023 via email

@rdmueller
Copy link
Member

  1. the docker container has a copy of all dependencies. They can be extracted and be used for the local version. See also https://doctoolchain.org/docToolchain/v2.0.x/020_tutorial/120_self-contained-dtc.html

  2. the dev-version of doctoolchain has already all dependencies upgraded. I hope we can release it soon.

  3. this not only breaks doctoolchain. In a corporate environment, a proxy for the artefacts will mitigate this. But we should think about a solution which makes us more independent from maven etc.

@rdmueller
Copy link
Member

argh. even when you switch to the latest version of doctoolchain, with all upgraded dependencies, it breaks.

You can set the version to "latest" instead of "2.2.1" in dtcw. This will switch to the latest development version

So I guess, the best fix at the moment is to get the docker image and extract the dependencies.

@rdmueller
Copy link
Member

We are making progress. Getting help from the grolifant maintainer. <3

@obfischer
Copy link
Author

@rdmueller Is there a change to keep the backward compatiblity? I mean getting it work without any change to docToolchain?

@rdmueller
Copy link
Member

it seems that we will get a first fix over the weekend:

https://fosstodon.org/@ysb33rOrg/110594542461938818

let's hope that this is all we need!

@rdmueller
Copy link
Member

btw: asciidoctor-jvm = "4.0.0-alpha.2" does not depend on the old grolifant anymore, but also not available yet.

@rdmueller
Copy link
Member

rdmueller commented Jun 23, 2023

Here is a workaround which seems to work:

do a local install of docToolchain:

./dtcw local install

now there will be a file $HOME/.doctoolchain/docToolchain-$version/build.gradle

predend the following lines to fix the missing versions for grolifant and http-builder:

buildscript {
    configurations.all {
        resolutionStrategy.eachDependency { DependencyResolveDetails details ->
            if (details.requested.group == 'org.ysb33r.gradle' && details.requested.name == 'grolifant' && details.requested.version == '0.12.1') {
                details.useVersion '0.16.1'
                details.because 'jcenter redirect'
                System.out.println ">>>>>>>>> fix grolifant"
            }
            if (details.requested.group == 'org.codehaus.groovy.modules.http-builder' && details.requested.name == 'http-builder' && details.requested.version == '0.7.2') {
                details.useVersion '0.7.1'
                details.because 'jcenter redirect'
                System.out.println ">>>>>>>>> fix http-builder"
            }
        }
    }
}

run your command

./dtcw local generateSite

@rdmueller
Copy link
Member

rdmueller commented Jun 23, 2023

updated status from Gradle:

Monitoring - JCenter is now serving artifacts again.

We're monitoring if this has resolved the situation and we'll provide more information later.
Jun 23, 2023 - 18:48 UTC

https://status.gradle.com/incidents/7x4wqd7zv715

rdmueller added a commit that referenced this issue Jun 24, 2023
@rdmueller rdmueller linked a pull request Jun 24, 2023 that will close this issue
rdmueller added a commit that referenced this issue Jun 24, 2023
…chain-as-grolifant-is-not-available-on-maven-central

fix dependency to jcenter fix #1200
@obfischer
Copy link
Author

Hi @rdmueller,

your patch works as expected on my machine.

Will be there a version 2.2.2 for docToolchain? Currently everyone downloading the old version will face the same problem? Or am I mistaken?

@rdmueller
Copy link
Member

@obfischer a 2.2.2 would be a good idea. But I think we will more likely do a fix forward. 3.0.0 is soon to be released.

Currently, people shouldn't face the problem anymore since jcenter is up and running again and Schalk Cronje was so kind to publish the 0.12.1 to the central maven repository. This gives us some time to fix things.

3.0.0 will have lots of dependency refreshes and we will discuss at the next Cyberland Open Source Camp, how we can even further mitigate this risk: https://cyberland.ijug.eu/2023-07-open-source-camp/

@obfischer
Copy link
Author

Cyberland is an offline event, right?

@rdmueller
Copy link
Member

online. remote.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants