Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-10693

‘./gradlew generateOfbizDocumentation’ fails with Gradle 5.0

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Trunk
    • Fix Version/s: 17.12.01
    • Component/s: framework
    • Labels:
      None

      Description

      We recently upgraded Gradle 3.2.1 → 5.0. The ./gradlew generateOfbizDocumentation command fails with the following stacktrace

      > Task :deleteOfbizDocumentation
      
      > Task :generateOfbizDocumentation FAILED
      Exception in thread "main" java.lang.ExceptionInInitializerError
      	at org.codehaus.groovy.runtime.InvokerHelper.<clinit>(InvokerHelper.java:86)
      	at groovy.lang.GroovyObjectSupport.getDefaultMetaClass(GroovyObjectSupport.java:59)
      	at groovy.lang.GroovyObjectSupport.<init>(GroovyObjectSupport.java:32)
      	at groovy.lang.Reference.<init>(Reference.java:38)
      	at org.asciidoctor.gradle.backported.AsciidoctorJavaExec.main(AsciidoctorJavaExec.groovy:188)
      Caused by: groovy.lang.GroovyRuntimeException: Conflicting module versions. Module [groovy-all is loaded in version 2.5.4 and you are trying to load version 2.4.7
      	at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl$DefaultModuleListener.onModule(MetaClassRegistryImpl.java:523)
      	at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanExtensionModuleFromProperties(ExtensionModuleScanner.java:87)
      	at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanExtensionModuleFromMetaInf(ExtensionModuleScanner.java:81)
      	at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanClasspathModulesFrom(ExtensionModuleScanner.java:63)
      	at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanClasspathModules(ExtensionModuleScanner.java:55)
      	at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:124)
      	at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:85)
      	at groovy.lang.GroovySystem.<clinit>(GroovySystem.java:36)
      	... 5 more
      
      FAILURE: Build failed with an exception.
      
      * What went wrong:
      Execution failed for task ':generateOfbizDocumentation'.
      > Process 'command '/gnu/store/w41g4n182c7qxaaq77jyrgdqifzzpvsp-icedtea-3.7.0-jdk/bin/java'' finished with non-zero exit value 1
      
      * 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 1s
      2 actionable tasks: 2 executed
      

      It seems that the AsciiDoctor Gradle Plugin is failing because Groovy 2.5.4 is now used by Gradle instead of Groovy 2.4.7
      I would be nice to work around this issue instead of downgrading Gradle.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jacques.le.roux Jacques Le Roux
                Reporter:
                mthl Mathieu Lirzin
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: