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

upgrade to "org.apache.groovy:groovy" #1529

Closed
octopus-prime opened this issue Apr 3, 2022 · 1 comment
Closed

upgrade to "org.apache.groovy:groovy" #1529

octopus-prime opened this issue Apr 3, 2022 · 1 comment

Comments

@octopus-prime
Copy link

octopus-prime commented Apr 3, 2022

In a common project you want to use pact-tests and rest-assured-tests. So you have this in your build.gradle

    testImplementation group: 'au.com.dius.pact.provider', name: 'junit5', version: '4.4.0-beta.0'
    testImplementation group: 'io.rest-assured', name: 'rest-assured', version: '5.0.0'
    testImplementation group: 'io.rest-assured', name: 'json-path', version: '5.0.0'
    testImplementation group: 'io.rest-assured', name: 'xml-path', version: '5.0.0'

But then you get these errors

Execution failed for task ':test'.
> Could not resolve all files for configuration ':testRuntimeClasspath'.
   > Could not resolve org.apache.groovy:groovy:4.0.1.
     Required by:
         project : > io.rest-assured:rest-assured:5.0.0
         project : > io.rest-assured:json-path:5.0.0
         project : > io.rest-assured:xml-path:5.0.0
         project : > io.rest-assured:rest-assured:5.0.0 > org.apache.groovy:groovy-xml:4.0.1
         project : > io.rest-assured:json-path:5.0.0 > org.apache.groovy:groovy-json:4.0.1
         project : > io.rest-assured:json-path:5.0.0 > io.rest-assured:rest-assured-common:5.0.0
         project : > io.rest-assured:rest-assured:5.0.0 > org.apache.groovy:groovy-xml:4.0.1 > org.apache.groovy:groovy-bom:4.0.1
      > Module 'org.apache.groovy:groovy' has been rejected:
           Cannot select module with conflict on capability 'org.codehaus.groovy:groovy:4.0.1' also provided by [org.codehaus.groovy:groovy:3.0.8(runtime)]
   > Could not resolve org.codehaus.groovy:groovy:3.0.8.
     Required by:
         project : > au.com.dius.pact.provider:junit5:4.4.0-beta.0 > au.com.dius.pact:provider:4.4.0-beta.0
      > Module 'org.codehaus.groovy:groovy' has been rejected:
           Cannot select module with conflict on capability 'org.codehaus.groovy:groovy:3.0.8' also provided by [org.apache.groovy:groovy:4.0.1(groovyRuntimeElements)]

Then you could try

    testImplementation(group: 'au.com.dius.pact.provider', name: 'junit5', version: '4.4.0-beta.0') {
        exclude group: 'org.codehaus.groovy', module: 'groovy'
    }

But upgrading to "org.apache.groovy:groovy" might be the better out-of-the-box solution...

See https://groovy-lang.org/releasenotes/groovy-4.0.html

In Groovy 4.0, the groupId of the maven coordinates for Groovy have changed from org.codehaus.groovy to org.apache.groovy. Please update your Gradle/Maven/other build settings appropriately.

uglyog pushed a commit that referenced this issue Apr 4, 2022
@octopus-prime
Copy link
Author

Thanks! Works fine with 4.4.0-beta.1

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

No branches or pull requests

1 participant