Hi, I am exploring Pact for our reactJS to springb...
# pact-jvm
s
Hi, I am exploring Pact for our reactJS to springboot/Java application. Can someone please help me with this issue.Some problems were found with the configuration of task ':pactVerify_test_provider' (type 'PactVerificationTask'). - In plugin 'au.com.dius.pact' type 'au.com.dius.pact.provider.gradle.PactVerificationTask' property 'providerToVerify' is missing an input or output annotation.
m
perhaps you could share your setup so that we can understand what you might have done differently?
also, what docs are you you using as a guide to setup your test?
s
I am referring - https://docs.pact.io/
Copy code
buildscript {
    repositories {
       mavenCentral()
    }
    dependencies {
       classpath 'au.com.dius.pact.provider:gradle:4.1.7'

    }
}
plugins {
    id 'java'
    id 'org.springframework.boot' version '2.7.17'
    id 'io.spring.dependency-management' version '1.0.15.RELEASE'
    id 'au.com.dius.pact' version '4.1.7'
}
group = 'com.pact.example'
version = '0.0.1-SNAPSHOT'

java {
    sourceCompatibility = '11'
}


apply plugin: 'au.com.dius.pact'
apply plugin: 'groovy'

repositories {
    mavenCentral()
}

test {
    useJUnitPlatform()
    systemProperty 'pact.verifier.publishResults', 'true'
}

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-web'
    developmentOnly 'org.springframework.boot:spring-boot-devtools'
    testImplementation 'org.springframework.boot:spring-boot-starter-test'
    testImplementation 'au.com.dius.pact.provider:junit5:4.1.7'
}

pact {

    reports {
       defaultReports()
    }
    broker {

       pactBrokerUrl = '<https://swethatest.pactflow.io/>'
       pactBrokerToken = '<token ..>'
    }

    serviceProviders {
       test_provider {
          fromPactBroker {

             hasPactsFromPactBroker('<https://swethatest.pactflow.io/>', authentication: ['Bearer', '<token ....>'])

          }
       }

    }
}
y
I can see the same issue reported on the pact-jvm repo. https://github.com/pact-foundation/pact-jvm/issues/1429 what version of gradle are you using
s
Copy code
gradle-8.4-bi
y
https://github.com/pact-foundation/pact-jvm/issues/1429#issuecomment-913875893 sounds like you need to update the package version of Pact to support your version of Gradle
That comment is 2 years old, ideally use that latest Pact library that supports your targeted Java version ( I see you have 11 in your file)