diff --git a/pact-jvm-consumer-groovy/README.md b/pact-jvm-consumer-groovy/README.md index d86efdecea..21533acdc8 100644 --- a/pact-jvm-consumer-groovy/README.md +++ b/pact-jvm-consumer-groovy/README.md @@ -9,7 +9,7 @@ The library is available on maven central using: * group-id = `au.com.dius` * artifact-id = `pact-jvm-consumer-groovy_2.11` -* version-id = `2.1.x` +* version-id = `2.2.x` ##Usage @@ -19,7 +19,7 @@ to define your pacts. For a full example, have a look at the example JUnit `Exam If you are using gradle for your build, add it to your `build.gradle`: dependencies { - testCompile 'au.com.dius:pact-jvm-consumer-groovy_2.11:2.1.5' + testCompile 'au.com.dius:pact-jvm-consumer-groovy_2.11:2.2.6' } Then create an instance of the `PactBuilder` in your test. @@ -304,3 +304,6 @@ test { } ``` +# Publishing your pact files to a pact broker + +If you use Gradle, you can use the [pact Gradle plugin](https://github.com/DiUS/pact-jvm/tree/master/pact-jvm-provider-gradle#publishing-pact-files-to-a-pact-broker) to publish your pact files. diff --git a/pact-jvm-consumer-junit/README.md b/pact-jvm-consumer-junit/README.md index c74bc06ad4..d45e52d42b 100644 --- a/pact-jvm-consumer-junit/README.md +++ b/pact-jvm-consumer-junit/README.md @@ -9,7 +9,7 @@ The library is available on maven central using: * group-id = `au.com.dius` * artifact-id = `pact-jvm-consumer-junit_2.11` -* version-id = `2.1.x` +* version-id = `2.2.x` ##Usage @@ -346,3 +346,7 @@ For SBT: fork in Test := true, javaOptions in Test := Seq("-Dpact.rootDir=some/other/directory") ``` + +# Publishing your pact files to a pact broker + +If you use Gradle, you can use the [pact Gradle plugin](https://github.com/DiUS/pact-jvm/tree/master/pact-jvm-provider-gradle#publishing-pact-files-to-a-pact-broker) to publish your pact files. diff --git a/pact-jvm-provider-gradle/README.md b/pact-jvm-provider-gradle/README.md index b0fbf67e3f..f36277bfab 100644 --- a/pact-jvm-provider-gradle/README.md +++ b/pact-jvm-provider-gradle/README.md @@ -308,3 +308,23 @@ To publish the plugin to the community portal: $ ./gradlew :pact-jvm-provider-gradle_2.11:publishPlugins +# Publishing pact files to a pact broker + +*[version 2.2.7+]* + +The pact gradle plugin provides a `pactPublish` task that can publish all pact files in a directory +to a pact broker. To use it, you need to add a publish configuration to the pact configuration that defines the +directory where the pact files are and the URL to the pact broker. + +For example: + +```groovy +pact { + + publish { + pactDirectory = '/pact/dir' // defaults to $buildDir/pacts + pactBrokerUrl = 'http://pactbroker:1234' + } + +} +```