Skip to content

Commit 04fdd75

Browse files
authored
Merge 3ab75a6 into 42b51c9
2 parents 42b51c9 + 3ab75a6 commit 04fdd75

File tree

3 files changed

+47
-15
lines changed

3 files changed

+47
-15
lines changed

README.md

Lines changed: 45 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Spring REST Docs API specification Integration
22

33
![](https://img.shields.io/github/license/ePages-de/restdocs-openapi.svg)
4-
[ ![Download](https://api.bintray.com/packages/epages/maven/restdocs-api-spec/images/download.svg) ](https://bintray.com/epages/maven/restdocs-api-spec/_latestVersion)
54
[![Build Status](https://travis-ci.org/ePages-de/restdocs-api-spec.svg?branch=master)](https://travis-ci.org/ePages-de/restdocs-api-spec)
65
[![Coverage Status](https://coveralls.io/repos/github/ePages-de/restdocs-api-spec/badge.svg?branch=master)](https://coveralls.io/github/ePages-de/restdocs-api-spec?branch=master)
76
[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/restdocs-api-spec/Lobby)
@@ -88,40 +87,40 @@ The [ResourceSnippet](restdocs-api-spec/src/main/kotlin/com/epages/restdocs/apis
8887
* Using the [plugins DSL](https://docs.gradle.org/current/userguide/plugins.html#sec:plugins_block):
8988
```groovy
9089
plugins {
91-
id 'com.epages.restdocs-api-spec' version '0.10.3'
90+
id 'com.epages.restdocs-api-spec' version '0.11.2'
9291
}
9392
```
9493
Examples with Kotlin are also available [here](https://plugins.gradle.org/plugin/com.epages.restdocs-api-spec)
9594
* __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`.
9796
* *1.2* add the dependency to `restdocs-api-spec-gradle-plugin`
9897
* *1.3* apply `restdocs-api-spec-gradle-plugin`
9998
```groovy
10099
buildscript {
101100
repositories {
102-
jcenter() //1.1
101+
mavenCentral() //1.1
103102
}
104103
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
106105
}
107106
}
108107
109108
apply plugin: 'com.epages.restdocs-api-spec' //1.3
110109
111110
```
112111
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.
114113
* *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`.
115114
* *2.3* add configuration options for restdocs-api-spec-gradle-plugin`. See [Gradle plugin configuration](#gradle-plugin-configuration)
116115
```groovy
117116
118117
repositories { //2.1
119-
jcenter()
118+
mavenCentral()
120119
}
121120
122121
dependencies {
123122
//..
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
125124
}
126125
127126
openapi { //2.3
@@ -576,3 +575,41 @@ See [openapi2raml.gradle](samples/restdocs-api-spec-sample/openapi2raml.gradle).
576575
./gradlew restdocs-api-spec-sample:openapi
577576
./gradlew -b samples/restdocs-api-spec-sample/openapi2raml.gradle openapi2raml
578577
```
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.

samples/restdocs-api-spec-sample-web-test-client/build.gradle

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ buildscript {
44
}
55
repositories {
66
mavenCentral()
7-
jcenter()
87
maven { url "https://plugins.gradle.org/m2/" }
98
}
109
dependencies {
@@ -20,7 +19,6 @@ apply plugin: 'com.epages.restdocs-api-spec'
2019

2120
repositories {
2221
mavenCentral()
23-
jcenter()
2422
}
2523

2624
sourceCompatibility = 1.8
@@ -37,7 +35,7 @@ dependencies {
3735
testImplementation('org.springframework.boot:spring-boot-starter-test')
3836
testImplementation('org.springframework.restdocs:spring-restdocs-webtestclient')
3937
testImplementation('io.projectreactor:reactor-test')
40-
testImplementation('com.epages:restdocs-api-spec:0.9.5')
38+
testImplementation('com.epages:restdocs-api-spec:0.11.2')
4139
}
4240

4341
openapi {
@@ -62,4 +60,3 @@ postman {
6260
version = '0.1.0'
6361
baseUrl = 'https://localhost:8080'
6462
}
65-

samples/restdocs-api-spec-sample/build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ buildscript {
44
}
55
repositories {
66
mavenCentral()
7-
jcenter()
87
maven { url "https://plugins.gradle.org/m2/" }
98
}
109
dependencies {
@@ -22,7 +21,6 @@ sourceCompatibility = 1.8
2221

2322
repositories {
2423
mavenCentral()
25-
jcenter()
2624
}
2725

2826
ext {
@@ -38,7 +36,7 @@ dependencies {
3836
testCompile('org.springframework.boot:spring-boot-starter-test')
3937
testCompile('org.springframework.restdocs:spring-restdocs-mockmvc')
4038

41-
testCompile('com.epages:restdocs-api-spec-mockmvc:0.9.5')
39+
testCompile('com.epages:restdocs-api-spec-mockmvc:0.11.2')
4240
// testCompile project(':restdocs-api-spec-mockmvc') //enable for depending on the submodule directly
4341
testCompile('com.google.guava:guava:23.0')
4442
}

0 commit comments

Comments
 (0)