pact-foundation / pact-jvm

JVM version of Pact. Enables consumer driven contract testing, providing a mock service and DSL for the consumer project, and interaction playback and verification for the service provider project.
https://docs.pact.io
Apache License 2.0
1.08k stars 479 forks source link

PactBrokerClient should be in common place #408

Closed lordofthejars closed 7 years ago

lordofthejars commented 7 years ago

Currently PactBrokerClient https://github.com/DiUS/pact-jvm/tree/master/pact-jvm-provider/src/main/groovy/au/com/dius/pact/provider/broker resides on provider project. The problem is that PactBrokerClient does not only contains operations used by provider but also by the consumer (for example upload pacts) https://github.com/DiUS/pact-jvm/blob/master/pact-jvm-provider/src/main/groovy/au/com/dius/pact/provider/broker/PactBrokerClient.groovy#L68

I think that this part should be moved as module itself, for example pact-jvm-pact-broker

I can spend time on this refactor if you agree.

uglyog commented 7 years ago

You are correct, that should be moved to a shared module. I've been thinking about consolidating the modules in the project, so maybe a pact-jvm-core would be better.

uglyog commented 7 years ago

Now that I think of it, the pact broker code could be useful to others and can probably be pulled out of pact-jvm all together.

lordofthejars commented 7 years ago

Completely agree, for example for Maven/Gradle/Jenkins plugins. Currently I am using it in Algeron.

uglyog commented 7 years ago

Version 3.5.3 has been released with the PactBrokerClient in its own module

lordofthejars commented 7 years ago

Great thank you very much, tomorrow I'll work on Arquillian Algeron to use this decoupled version.