pact-jvm: Since 4.3.16 pact publish configuration can not be found
We updated from 4.3.15 to 4.3.16 and now see this issue
You must add a pact publish configuration to your build before you can use the pactPublish task
Altough we have a pact publish configuration and it still works with 4.3.15. We use Gradle 7.5.1
Does may this commit has something to do with it: https://github.com/pact-foundation/pact-jvm/commit/e3dd8bf5d1cdaa263c428cb1e0fdc94196ce6fde?diff=split#diff-84994c4f13669c1feb65cf6db4a09398e94d9fef8d687329926cbd4547cb1370
Since 4.3.16 it seems like our pactPublish in this class is null https://github.com/pact-foundation/pact-jvm/blob/master/provider/gradle/src/main/groovy/au/com/dius/pact/provider/gradle/PactPublishTask.groovy#L41
We don´t use Configuration cache as also Gradle says it is an incubating feature. https://docs.gradle.org/current/userguide/configuration_cache.html
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 22 (10 by maintainers)
Commits related to this issue
- fix: remove the optional annotation from PactPublish attribute in PactPublishTask #1634 — committed to pact-foundation/pact-jvm by rholshausen a year ago
- fix: remove the optional annotation from PactPublish attribute in PactPublishTask #1634 — committed to pact-foundation/pact-jvm by rholshausen a year ago
Any updates on this one? I’m also facing that issue with newer versions.
I am experiencing a similar issue to what @eloo posted above. Prior to version 4.3.16 we were using the following configuration:
pactPublish.dependsOn testWith the update to 4.3.16 and on 4.4.x I receive the following error whenever I try to run
gradle pactPublishYou must add a pact publish configuration to your build before you can use the pactPublish taskTrying on 4.5.0 I see the new error:
I tried using the workaround mentioned above, like so, but I still get the same error.
Is there a different way to specify a dependency that should be used in place of this? Prior to 4.3.16 it was all working as expected.
Appending this to the previous example is a strange/buggy but working workaround: