|
1 | 1 | # Spring REST Docs API specification Integration
|
2 | 2 |
|
3 | 3 | 
|
4 |
| -[  ](https://bintray.com/epages/maven/restdocs-api-spec/_latestVersion) |
5 | 4 | [](https://travis-ci.org/ePages-de/restdocs-api-spec)
|
6 | 5 | [](https://coveralls.io/github/ePages-de/restdocs-api-spec?branch=master)
|
7 | 6 | [](https://gitter.im/restdocs-api-spec/Lobby)
|
@@ -88,40 +87,40 @@ The [ResourceSnippet](restdocs-api-spec/src/main/kotlin/com/epages/restdocs/apis
|
88 | 87 | * Using the [plugins DSL](https://docs.gradle.org/current/userguide/plugins.html#sec:plugins_block):
|
89 | 88 | ```groovy
|
90 | 89 | plugins {
|
91 |
| - id 'com.epages.restdocs-api-spec' version '0.10.3' |
| 90 | + id 'com.epages.restdocs-api-spec' version '0.11.2' |
92 | 91 | }
|
93 | 92 | ```
|
94 | 93 | Examples with Kotlin are also available [here](https://plugins.gradle.org/plugin/com.epages.restdocs-api-spec)
|
95 | 94 | * __OR__ Using [legacy plugin application](https://docs.gradle.org/current/userguide/plugins.html#sec:old_plugin_application):
|
96 |
| - * *1.1* Use of `buildscript` requires you to add `jcenter` repositories to `buildscript` to resolve the `restdocs-api-spec-gradle-plugin`. |
| 95 | + * *1.1* Use of `buildscript` requires you to add `mavenCentral` repositories to `buildscript` to resolve the `restdocs-api-spec-gradle-plugin`. |
97 | 96 | * *1.2* add the dependency to `restdocs-api-spec-gradle-plugin`
|
98 | 97 | * *1.3* apply `restdocs-api-spec-gradle-plugin`
|
99 | 98 | ```groovy
|
100 | 99 | buildscript {
|
101 | 100 | repositories {
|
102 |
| - jcenter() //1.1 |
| 101 | + mavenCentral() //1.1 |
103 | 102 | }
|
104 | 103 | dependencies {
|
105 |
| - classpath('com.epages:restdocs-api-spec-gradle-plugin:0.10.3') //1.2 |
| 104 | + classpath('com.epages:restdocs-api-spec-gradle-plugin:0.11.2') //1.2 |
106 | 105 | }
|
107 | 106 | }
|
108 | 107 |
|
109 | 108 | apply plugin: 'com.epages.restdocs-api-spec' //1.3
|
110 | 109 |
|
111 | 110 | ```
|
112 | 111 | 2. Add required dependencies to your tests
|
113 |
| - * *2.1* add the `jcenter` repository used to resolve the `com.epages:restdocs-api-spec` module of the project. |
| 112 | + * *2.1* add the `mavenCentral` repository used to resolve the `com.epages:restdocs-api-spec` module of the project. |
114 | 113 | * *2.2* add the actual `restdocs-api-spec-mockmvc` dependency to the test scope. Use `restdocs-api-spec-restassured` if you use `RestAssured` instead of `MockMvc`.
|
115 | 114 | * *2.3* add configuration options for restdocs-api-spec-gradle-plugin`. See [Gradle plugin configuration](#gradle-plugin-configuration)
|
116 | 115 | ```groovy
|
117 | 116 |
|
118 | 117 | repositories { //2.1
|
119 |
| - jcenter() |
| 118 | + mavenCentral() |
120 | 119 | }
|
121 | 120 |
|
122 | 121 | dependencies {
|
123 | 122 | //..
|
124 |
| - testCompile('com.epages:restdocs-api-spec-mockmvc:0.10.3') //2.2 |
| 123 | + testCompile('com.epages:restdocs-api-spec-mockmvc:0.11.2') //2.2 |
125 | 124 | }
|
126 | 125 |
|
127 | 126 | openapi { //2.3
|
@@ -576,3 +575,41 @@ See [openapi2raml.gradle](samples/restdocs-api-spec-sample/openapi2raml.gradle).
|
576 | 575 | ./gradlew restdocs-api-spec-sample:openapi
|
577 | 576 | ./gradlew -b samples/restdocs-api-spec-sample/openapi2raml.gradle openapi2raml
|
578 | 577 | ```
|
| 578 | + |
| 579 | +## Maintenance |
| 580 | + |
| 581 | +This section of the README is targeted at project maintainers. |
| 582 | + |
| 583 | +### Publish project |
| 584 | + |
| 585 | +The project is published with the help of [TravisCI](./.travis.yml). |
| 586 | +It's version number is determined by the Git tags (see [allegro/axion-release-plugin](https://axion-release-plugin.readthedocs.io)). |
| 587 | +The Java dependencies are published to Sonatype with the help of the [gradle-nexus/publish-plugin](https://github.com/gradle-nexus/publish-plugin) and the Maven Publish Plugin. |
| 588 | +The Gradle plugin is published to the [Gradle plugin portal](https://plugins.gradle.org/plugin/com.epages.restdocs-api-spec) with the help of the ['plugin-publish' plugin](https://plugins.gradle.org/plugin/com.gradle.plugin-publish) (see [docs.gradle.org](https://docs.gradle.org/current/userguide/publishing_gradle_plugins.html)). |
| 589 | +
|
| 590 | +
|
| 591 | +Given that the `master` branch on the upstream repository is in the state from which you want to create a release, execute the following steps: |
| 592 | +
|
| 593 | +1. [Create release via the GitHub UI](https://github.com/ePages-de/restdocs-api-spec/releases/new) |
| 594 | +
|
| 595 | +Use the intended version number as "Tag version", e.g. "0.11.2". |
| 596 | +
|
| 597 | +This will automatically trigger a Travis build which publishes the JAR files for this release to Sonatype. |
| 598 | +
|
| 599 | +2. Login to Sonatype |
| 600 | +
|
| 601 | +Login to Sonatype and navigate to the [staging repositories](https://oss.sonatype.org/#stagingRepositories). |
| 602 | +
|
| 603 | +3. Close the staging repository |
| 604 | +
|
| 605 | +Select the generated staging repository and close it. |
| 606 | +Check that there are no errors afterwards (e.g. missing signatures or Javadoc JARs). |
| 607 | +
|
| 608 | +4. Release the repository |
| 609 | +
|
| 610 | +Select the generated staging repository and publish it. |
| 611 | +Soon after, the release should be available in the ["Public Repositories" of ePages](https://oss.sonatype.org/service/local/repo_groups/public/content/com/epages/). |
| 612 | +
|
| 613 | +5. Update documentation |
| 614 | +
|
| 615 | +Create a new commit which updates the version numbers in the `README` file. |
0 commit comments