diff --git a/docs/src/main/asciidoc/verifier/rest.adoc b/docs/src/main/asciidoc/verifier/rest.adoc index a2eb2ab2da..55d1d2173d 100644 --- a/docs/src/main/asciidoc/verifier/rest.adoc +++ b/docs/src/main/asciidoc/verifier/rest.adoc @@ -47,10 +47,7 @@ Add the additional snapshot repository to your build.gradle to use snapshot vers [source,groovy,indent=0] ---- -repositories { - (...) - //Required only for SNAPSHOT versions - maven { url "https://repo.spring.io/plugins-snapshot-local" } +include::{standalone_samples_path}/http-server/build.gradle[tags=repos,indent=0] } ---- @@ -96,74 +93,6 @@ repositories { Read more: https://cloud.spring.io/spring-cloud-contract/spring-cloud-contract-maven-plugin/[spring-cloud-contract-maven-plugin] -====== Snapshot versions for Maven - -For Snapshot / Milestone versions you have to add the following section to your `pom.xml` - -[source,xml,indent=0] ----- - - - spring-snapshots - Spring Snapshots - http://repo.spring.io/libs-snapshot-local - - true - - - - spring-milestones - Spring Milestones - http://repo.spring.io/libs-milestone-local - - false - - - - spring-releases - Spring Releases - http://repo.spring.io/release - - false - - - - - - spring-snapshots - Spring Snapshots - http://repo.spring.io/libs-snapshot-local - - true - - - - spring-milestones - Spring Milestones - http://repo.spring.io/libs-milestone-local - - false - - - - spring-plugin-snapshots - Spring Snapshots - http://repo.spring.io/plugins-snapshot-local - - true - - - - spring-plugin-milestones - Spring Milestones - http://repo.spring.io/plugins-milestone-local - - false - - - ----- - ====== Add stubs By default Spring Cloud Contract Verifier is looking for stubs in `src/test/resources/contracts` directory. @@ -338,72 +267,13 @@ include::{standalone_samples_path}/http-server/pom.xml[tags=contract_maven_plugi You can read more in the https://cloud.spring.io/spring-cloud-contract/spring-cloud-contract-maven-plugin/[Spring Cloud Contract Maven Plugin Docs] -====== Snapshot versions +====== Snapshot versions for Maven For Snapshot / Milestone versions you have to add the following section to your `pom.xml` [source,xml,indent=0] ---- - - - spring-snapshots - Spring Snapshots - http://repo.spring.io/libs-snapshot-local - - true - - - - spring-milestones - Spring Milestones - http://repo.spring.io/libs-milestone-local - - false - - - - spring-releases - Spring Releases - http://repo.spring.io/release - - false - - - - - - spring-snapshots - Spring Snapshots - http://repo.spring.io/libs-snapshot-local - - true - - - - spring-milestones - Spring Milestones - http://repo.spring.io/libs-milestone-local - - false - - - - spring-plugin-snapshots - Spring Snapshots - http://repo.spring.io/plugins-snapshot-local - - true - - - - spring-plugin-milestones - Spring Milestones - http://repo.spring.io/plugins-milestone-local - - false - - - +include::{standalone_samples_path}/http-server/pom.xml[tags=repos,indent=0] ---- ===== Add stubs diff --git a/docs/src/main/asciidoc/verifier/stubrunner.adoc b/docs/src/main/asciidoc/verifier/stubrunner.adoc index f8caa87f78..0c1a1fb942 100644 --- a/docs/src/main/asciidoc/verifier/stubrunner.adoc +++ b/docs/src/main/asciidoc/verifier/stubrunner.adoc @@ -14,10 +14,7 @@ Add the additional snapshot repository to your build.gradle to use snapshot vers [source,groovy,indent=0] ---- -repositories { - (...) - //Required only for SNAPSHOT versions - maven { url "https://repo.spring.io/libs-snapshot-local" } +include::{standalone_samples_path}/http-server/build.gradle[tags=repos,indent=0] } ---- @@ -25,32 +22,7 @@ for Maven [source,xml,indent=0] ---- - - - spring-snapshots - Spring Snapshots - http://repo.spring.io/libs-snapshot-local - - true - - - - spring-milestones - Spring Milestones - http://repo.spring.io/libs-milestone-local - - false - - - - spring-releases - Spring Releases - http://repo.spring.io/release - - false - - - +include::{standalone_samples_path}/http-server/pom.xml[tags=repos,indent=0] ---- ==== Publishing stubs as JARs diff --git a/samples/standalone/http-server/build.gradle b/samples/standalone/http-server/build.gradle index 68857fc07a..f3d24fd8e4 100644 --- a/samples/standalone/http-server/build.gradle +++ b/samples/standalone/http-server/build.gradle @@ -1,3 +1,4 @@ +// tag::repos[] buildscript { repositories { mavenCentral() @@ -6,6 +7,7 @@ buildscript { maven { url "http://repo.spring.io/milestone" } maven { url "http://repo.spring.io/release" } } +// end::repos[] dependencies { classpath "org.springframework.boot:spring-boot-gradle-plugin:1.4.0.BUILD-SNAPSHOT" classpath "org.springframework.cloud:spring-cloud-contract-gradle-plugin:${findProperty('verifierVersion') ?: verifierVersion}" diff --git a/samples/standalone/http-server/pom.xml b/samples/standalone/http-server/pom.xml index 4eb230194e..80bdb58cd8 100644 --- a/samples/standalone/http-server/pom.xml +++ b/samples/standalone/http-server/pom.xml @@ -124,6 +124,7 @@ true + spring-snapshots @@ -176,6 +177,7 @@ + diff --git a/scripts/generateDocs.sh b/scripts/generateDocs.sh index c625bea814..07b3a38d85 100755 --- a/scripts/generateDocs.sh +++ b/scripts/generateDocs.sh @@ -10,7 +10,7 @@ echo "Building main docs" ./mvnw clean install -P docs -DskipTests=true --pl docs echo "Building maven plugin docs" -./mvnw site site:stage -DskipTests=true --pl spring-cloud-contract-tools/spring-cloud-contract-maven-plugin +./mvnw site -DskipTests=true --pl spring-cloud-contract-tools/spring-cloud-contract-maven-plugin echo "Copying generated maven plugin docs to main docs" cp -r spring-cloud-contract-tools/spring-cloud-contract-maven-plugin/target/site docs/target/generated-docs/spring-cloud-contract-maven-plugin \ No newline at end of file