asciidoctor / asciidoctor-gradle-plugin

A Gradle plugin that uses Asciidoctor via JRuby to process AsciiDoc source files within the project.
https://asciidoctor.github.io/asciidoctor-gradle-plugin/
Apache License 2.0
285 stars 120 forks source link

Dependency resolving error when using docExtensions #617

Closed roaroid closed 1 year ago

roaroid commented 3 years ago

When trying to include a custom extension (big.groovy) through docExtensions the gradle build fails because org.asciidoctor:asciidoctorj-groovy-dsl:2.0.0 cannot be found. The actual version of asciidoctorj-groovy-dsl is 2.0.2 on mavenCentral - the missing version 2.0.0 was on jCenter which was shutdown in february.

Is it possible to update the dependency?

build.gradle

plugins {
  id 'org.asciidoctor.jvm.convert' version '3.3.2'
}

repositories {
  mavenCentral()
}

asciidoctorj {
  docExtensions file('big.groovy')
}

asciidoctor {
  sources {
    include 'master.adoc'
  }
}

Output with gradle 7.2

> Task :asciidoctor FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':asciidoctor'.
> Could not resolve all files for configuration ':detachedConfiguration2'.
   > Could not find org.asciidoctor:asciidoctorj-groovy-dsl:2.0.0.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/org/asciidoctor/asciidoctorj-groovy-dsl/2.0.0/asciidoctorj-groovy-dsl-2.0.0.pom
     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.
     Required by:
         project :

* Try:
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.

* Get more help at https://help.gradle.org

BUILD FAILED in 904ms
1 actionable task: 1 executed
rolling-robot commented 2 years ago

This looks like a duplicate of https://github.com/asciidoctor/asciidoctor-gradle-plugin/issues/620

Also there is a workaround that worked for me https://github.com/asciidoctor/asciidoctor-gradle-plugin/issues/620#issuecomment-1001011848

ysb33r commented 1 year ago

Fixed in 4.0.0-alpha.1