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

Class file for org.apache.http.entity.mime.MultipartEntityBuilder not found in Pact 4.2.12 #1446

Closed
cberg-zalando opened this issue Sep 21, 2021 · 1 comment

Comments

@cberg-zalando
Copy link

We have a project built with Gradle 7.1.1 using

  • au.com.dius.pact.provider:junit5
  • au.com.dius.pact.provider:spring
  • au.com.dius.pact.consumer:junit5

as dependencies. Until Pact 4.2.11 everything was fine, but when dependabot suggested the updated to 4.2.12 our build started failing with class file for org.apache.http.entity.mime.MultipartEntityBuilder not found when calling PactDslWithProvider::body with a PactDslJsonBody instance.

I traced it down to the new feature of allowing to pass an org.apache.http.entity.mime.MultipartEntityBuilder from theorg.apache.httpcomponents:httpmime library, which is a dependency of the au.com.dius.pact:consumer library. This library also uses Gradle and defines the httpmime library via implementation scope, which according to Gradle's documentation says, that it will not be exposed to the actual library consumer. The JUnit5 consumer pulls that library in via api scope, but I assume, that Gradle does not apply the scope widening to the dependencies of the pulled in dependency resulting in the httpmime library being unavailable during the test compilation.

@uglyog
Copy link
Member

uglyog commented Sep 27, 2021

Ah, MultipartEntityBuilder is not in the main Apache HTTP library. I'll add that as an api dependency.

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

3 participants