gpc / fields

a spiritual successor to the bean-fields plugin
http://gpc.github.io/fields/
84 stars 104 forks source link

Exclude org.codehaus.groovy:2.4.6 from groovydoc-gradle-plugin #356

Closed jamesfredley closed 2 months ago

jamesfredley commented 2 months ago

Resolves the following:

A problem occurred configuring root project 'fields'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not resolve org.codehaus.groovy:groovy-groovydoc:2.4.6.
     Required by:
         root project : > io.github.groovylang.groovydoc:groovydoc-gradle-plugin:1.0.1
      > Module 'org.codehaus.groovy:groovy-groovydoc' has been rejected:
           Cannot select module with conflict on capability 'org.codehaus.groovy:groovy-groovydoc:2.4.6' also provided by [org.apache.groovy:groovy-groovydoc:4.0.22(groovyRuntimeElements)]
   > Could not resolve org.apache.groovy:groovy:4.0.22.
     Required by:
         root project : > org.grails:grails-gradle-plugin:7.0.0-SNAPSHOT:20240918.041752-18 > org.grails:grails-shell:7.0.0-SNAPSHOT:20240917.014737-33
         root project : > org.grails:grails-gradle-plugin:7.0.0-SNAPSHOT:20240918.041752-18 > org.grails:grails-shell:7.0.0-SNAPSHOT:20240917.014737-33 > org.apache.groovy:groovy-ant:4.0.22
         root project : > org.grails:grails-gradle-plugin:7.0.0-SNAPSHOT:20240918.041752-18 > org.grails:grails-shell:7.0.0-SNAPSHOT:20240917.014737-33 > org.apache.groovy:groovy-json:4.0.22
         root project : > org.grails:grails-gradle-plugin:7.0.0-SNAPSHOT:20240918.041752-18 > org.grails:grails-shell:7.0.0-SNAPSHOT:20240917.014737-33 > org.apache.groovy:groovy-jmx:4.0.22
         root project : > org.grails:grails-gradle-plugin:7.0.0-SNAPSHOT:20240918.041752-18 > org.grails:grails-shell:7.0.0-SNAPSHOT:20240917.014737-33 > org.apache.groovy:groovy-ant:4.0.22 > org.apache.groovy:groovy-bom:4.0.22
      > Module 'org.apache.groovy:groovy' has been rejected:
           Cannot select module with conflict on capability 'org.codehaus.groovy:groovy:4.0.22' also provided by [org.codehaus.groovy:groovy:2.4.6(runtime)]
   > Could not resolve org.codehaus.groovy:groovy:2.4.6.
     Required by:
         root project : > io.github.groovylang.groovydoc:groovydoc-gradle-plugin:1.0.1 > org.codehaus.groovy:groovy-groovydoc:2.4.6
         root project : > io.github.groovylang.groovydoc:groovydoc-gradle-plugin:1.0.1 > org.codehaus.groovy:groovy-groovydoc:2.4.6 > org.codehaus.groovy:groovy-templates:2.4.6
         root project : > io.github.groovylang.groovydoc:groovydoc-gradle-plugin:1.0.1 > org.codehaus.groovy:groovy-groovydoc:2.4.6 > org.codehaus.groovy:groovy-templates:2.4.6 > org.codehaus.groovy:groovy-xml:2.4.6
      > Module 'org.codehaus.groovy:groovy' has been rejected:
           Cannot select module with conflict on capability 'org.codehaus.groovy:groovy:2.4.6' also provided by [org.apache.groovy:groovy:4.0.22(groovyRuntimeElements)]
   > Could not resolve org.apache.groovy:groovy-groovydoc:4.0.22.
     Required by:
         root project : > org.grails:grails-gradle-plugin:7.0.0-SNAPSHOT:20240918.041752-18 > org.grails:grails-shell:7.0.0-SNAPSHOT:20240917.014737-33 > org.apache.groovy:groovy-ant:4.0.22
         root project : > org.grails:grails-gradle-plugin:7.0.0-SNAPSHOT:20240918.041752-18 > org.grails:grails-shell:7.0.0-SNAPSHOT:20240917.014737-33 > org.apache.groovy:groovy-ant:4.0.22 > org.apache.groovy:groovy-bom:4.0.22
      > Module 'org.apache.groovy:groovy-groovydoc' has been rejected:
           Cannot select module with conflict on capability 'org.codehaus.groovy:groovy-groovydoc:4.0.22' also provided by [org.codehaus.groovy:groovy-groovydoc:2.4.6(runtime)]

* 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 265ms
jamesfredley commented 2 months ago

Updated to just exclude to the very old Groovy dependency

        classpath 'io.github.groovylang.groovydoc:groovydoc-gradle-plugin:1.0.1', {
            exclude group:'org.codehaus.groovy'
        }
jamesfredley commented 2 months ago

Will be fixed by https://github.com/grails/grails-gradle-plugin/pull/337

jamesfredley commented 2 months ago

The order of repositories and dependencies in buildscript{} is critical. grails-gradle-plugin must load first, since it fixes the Groovy version for other dependencies and that means is should come from the first repository on the list and be the first dependency listed under buildscript{}