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

plugin version higher than 4.3.19 throws exception #1686

Closed
wmunyan opened this issue Apr 20, 2023 · 5 comments
Closed

plugin version higher than 4.3.19 throws exception #1686

wmunyan opened this issue Apr 20, 2023 · 5 comments

Comments

@wmunyan
Copy link

wmunyan commented Apr 20, 2023

I am using gradle with the following plugins section:

plugins {
   ...
   id "au.com.dius.pact" version "4.3.19"

and some test dependencies:

testImplementation group: 'au.com.dius.pact', name: 'consumer', version: '4.3.19'
testImplementation group: 'au.com.dius.pact', name: 'provider', version: '4.3.19'

testImplementation 'au.com.dius:pact-jvm-provider-gradle:4.0.10'
testImplementation 'au.com.dius:pact-jvm-consumer-junit:4.0.10'

However, if I try to use any version higher than 4.3.19, executing any gradle tasks fails with the following error:

Cannot invoke "org.gradle.api.artifacts.VersionConstraint.getRequiredVersion()" because "cst" is null

It looks as though I am using gradle 7.4.2, if that helps. Thanks for any help!

@rholshausen
Copy link
Contributor

Don't mix major Pact-JVM versions. You're using both 4.3.19 and 4.0.10.

@wmunyan
Copy link
Author

wmunyan commented May 2, 2023

The highest available version of au.com.dius:pact-jvm-consumer-junit is 4.0.10 per https://mvnrepository.com/artifact/au.com.dius/pact-jvm-consumer-junit

The highest available version of au.com.dius:pact-jvm-provider-gradle is 4.0.10 per https://mvnrepository.com/artifact/au.com.dius/pact-jvm-provider-gradle

@rholshausen
Copy link
Contributor

Use au.com.dius.pact.consumer:junit:4.3.19 and au.com.dius.pact.provider:gradle:4.3.19

@ealesjordan
Copy link
Contributor

ealesjordan commented Jul 5, 2023

I get the same issue when I have no pact dependencies added in.

Attempting with gradle plugin version 4.6.1 and gradle version 7.4.2.


However, if I roll back the pact gradle plugin and add the latest dependencies like this:

plugins {
    ...
    id 'au.com.dius.pact' version '4.3.12'
}

And try to include these dependencies:

{
    ...
    testImplementation 'au.com.dius.pact.provider:junit5spring:4.6.1'
    testImplementation 'au.com.dius.pact.consumer:junit5:4.6.1'
}

I get this exception for both of the dependencies:

 Cannot invoke "org.gradle.api.artifacts.VersionConstraint.getRequiredVersion()" because "cst" is null

The same thing happens if I use the gradle plugin version of 4.6.1 to match up with the dependency version.


The only way I can get it to work is rollback the plugin and the dependencies to 4.3.19 (4.4.0 has the same issues)

@rholshausen
Copy link
Contributor

These must be the same:
image

@YOU54F YOU54F closed this as completed Jun 18, 2024
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

4 participants