Skip to content
This repository was archived by the owner on Aug 21, 2025. It is now read-only.

Conversation

@solarmosaic-kflorence
Copy link
Contributor

See #212 -- it seems that when given a new File(relativePath), file.createNewFile() will create a file in a different place for SBT sub-projects and root-projects. Using new File(absolutePath) instead resolves this issue.

I'm not sure the best way to add test coverage for this, but it can be reproduced by:

  • creating an SBT project that has a sub-project and a root project both with .enablePlugins(ScalaPactPlugin).
  • creating a consumer pact in both projects and and running tests against them (sbt pactTest, assuming you .aggregate the sub-project in the root project)
  • you should see pact files get generated in the root target/pacts folder, as well as in subProject/target/pacts prior to this fix, and after this fix they should both be in the root target/pacts folder.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant