spring-cloud / spring-cloud-contract

Support for Consumer Driven Contracts in Spring
https://cloud.spring.io/spring-cloud-contract
Apache License 2.0
720 stars 439 forks source link

Fix docker gradle build #2142

Closed elysrivero99 closed 1 week ago

elysrivero99 commented 1 week ago

Using springcloud/spring-cloud-contract to run external contracts fails due to:

org.gradle.internal.execution.WorkValidationException: A problem was found with the configuration of task ':generatePomFileForMavenPublication' (type 'GenerateMavenPom').
  - Gradle detected a problem with the following location: '/spring-cloud-contract/build/publications/maven/pom-default.xml'.

    Reason: Task ':copyOutput' uses this output of task ':generatePomFileForMavenPublication' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.

    Possible solutions:
      1. Declare task ':generatePomFileForMavenPublication' as an input of ':copyOutput'.
      2. Declare an explicit dependency on ':generatePomFileForMavenPublication' from ':copyOutput' using Task#dependsOn.
      3. Declare an explicit dependency on ':generatePomFileForMavenPublication' from ':copyOutput' using Task#mustRunAfter.
marcingrzejszczak commented 1 week ago

Thank you @elysrivero99 for your first contribution! :balloon: