Upgraded docs

This commit is contained in:
Marcin Grzejszczak
2016-07-25 13:16:17 +02:00
parent 8f5ac005c3
commit c40069144d
5 changed files with 10 additions and 164 deletions

View File

@@ -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]
----
<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>http://repo.spring.io/libs-snapshot-local</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>http://repo.spring.io/libs-milestone-local</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>http://repo.spring.io/release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>http://repo.spring.io/libs-snapshot-local</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>http://repo.spring.io/libs-milestone-local</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-plugin-snapshots</id>
<name>Spring Snapshots</name>
<url>http://repo.spring.io/plugins-snapshot-local</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-plugin-milestones</id>
<name>Spring Milestones</name>
<url>http://repo.spring.io/plugins-milestone-local</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
----
====== 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]
----
<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>http://repo.spring.io/libs-snapshot-local</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>http://repo.spring.io/libs-milestone-local</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>http://repo.spring.io/release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>http://repo.spring.io/libs-snapshot-local</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>http://repo.spring.io/libs-milestone-local</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-plugin-snapshots</id>
<name>Spring Snapshots</name>
<url>http://repo.spring.io/plugins-snapshot-local</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-plugin-milestones</id>
<name>Spring Milestones</name>
<url>http://repo.spring.io/plugins-milestone-local</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
include::{standalone_samples_path}/http-server/pom.xml[tags=repos,indent=0]
----
===== Add stubs

View File

@@ -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]
----
<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>http://repo.spring.io/libs-snapshot-local</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>http://repo.spring.io/libs-milestone-local</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>http://repo.spring.io/release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
include::{standalone_samples_path}/http-server/pom.xml[tags=repos,indent=0]
----
==== Publishing stubs as JARs

View File

@@ -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}"

View File

@@ -124,6 +124,7 @@
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<!-- tag::repos[] -->
<repositories>
<repository>
<id>spring-snapshots</id>
@@ -176,6 +177,7 @@
</snapshots>
</pluginRepository>
</pluginRepositories>
<!-- end::repos[] -->
</profile>
</profiles>
</project>

View File

@@ -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