asciidoctor / asciidoctorj

:coffee: Java bindings for Asciidoctor. Asciidoctor on the JVM!
http://asciidoctor.org
Apache License 2.0
627 stars 172 forks source link

Dependency resolving error when using docExtensions #1053

Closed roaroid closed 3 years ago

roaroid commented 3 years ago

When trying to include a custom extension 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
robertpanzer commented 3 years ago

Please open this ticket in https://github.com/asciidoctor/asciidoctor-gradle-plugin. I could imagine that there is already a solution for using a different version of the dsl.