Skip to content
This repository was archived by the owner on Dec 19, 2023. It is now read-only.

Commit 05f60e4

Browse files
authored
Java 10/11 (#310)
* applied niknetniko@83e1b4c * maven builds for Java 10/11 * travis openjdk10+11 * module fix * module fix * building gradle for each jdk * doclet fix * actual fix * maybe not dokka..
1 parent c039c99 commit 05f60e4

File tree

25 files changed

+292
-73
lines changed

25 files changed

+292
-73
lines changed

.travis.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ dist: trusty
44
jdk:
55
- oraclejdk8
66
- oraclejdk9
7+
- openjdk10
8+
- openjdk11
79
before_cache:
810
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
911
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
@@ -20,15 +22,15 @@ script:
2022
- mvn install -B -V
2123
- cd samples
2224
- mvn install -B -V
23-
- test "$TRAVIS_JDK_VERSION" = "oraclejdk8" && cd java-webmvc && ./gradlew check && cd .. || (exit 0)
25+
- cd java-webmvc && ./gradlew check && cd ..
2426
- test "$TRAVIS_JDK_VERSION" = "oraclejdk8" && cd kotlin-webmvc && ./gradlew check && cd .. || (exit 0)
2527
after_success:
2628
- echo $GPG_SECRET_KEYS | base64 --decode | gpg --import
2729
- cd $TRAVIS_BUILD_DIR
28-
- test "$TRAVIS_BRANCH" = "master"
30+
- test "$TRAVIS_PULL_REQUEST" = "false"
2931
&& test "$TRAVIS_JDK_VERSION" = "oraclejdk8"
3032
&& mvn deploy --settings travis-settings.xml -DskipTests=true -B -V
31-
- test "$TRAVIS_BRANCH" = "master"
33+
- test "$TRAVIS_PULL_REQUEST" = "false"
3234
&& test "$TRAVIS_JDK_VERSION" = "oraclejdk9"
3335
&& cd spring-auto-restdocs-json-doclet-jdk9
3436
&& mvn deploy --settings ../travis-settings.xml -DskipTests=true -B -V

pom.xml

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
<plugin>
147147
<groupId>org.apache.maven.plugins</groupId>
148148
<artifactId>maven-resources-plugin</artifactId>
149-
<version>3.0.2</version>
149+
<version>3.1.0</version>
150150
</plugin>
151151
<plugin>
152152
<groupId>org.apache.maven.plugins</groupId>
@@ -156,7 +156,7 @@
156156
<plugin>
157157
<groupId>org.apache.maven.plugins</groupId>
158158
<artifactId>maven-surefire-plugin</artifactId>
159-
<version>2.21.0</version>
159+
<version>2.22.1</version>
160160
</plugin>
161161
<plugin>
162162
<groupId>org.asciidoctor</groupId>
@@ -166,7 +166,7 @@
166166
<plugin>
167167
<groupId>org.apache.maven.plugins</groupId>
168168
<artifactId>maven-clean-plugin</artifactId>
169-
<version>3.0.0</version>
169+
<version>3.1.0</version>
170170
</plugin>
171171
</plugins>
172172
</pluginManagement>
@@ -210,6 +210,42 @@
210210
<module>spring-auto-restdocs-docs</module>
211211
</modules>
212212
</profile>
213+
<profile>
214+
<id>java10</id>
215+
<activation>
216+
<jdk>10</jdk>
217+
</activation>
218+
<properties>
219+
<java.version>10</java.version>
220+
<maven.compiler.source>10</maven.compiler.source>
221+
<maven.compiler.target>10</maven.compiler.target>
222+
<json-doclet.artifactId>spring-auto-restdocs-json-doclet-jdk9</json-doclet.artifactId>
223+
</properties>
224+
<modules>
225+
<module>spring-auto-restdocs-json-doclet-jdk9</module>
226+
<module>spring-auto-restdocs-annotations</module>
227+
<module>spring-auto-restdocs-core</module>
228+
<module>spring-auto-restdocs-docs</module>
229+
</modules>
230+
</profile>
231+
<profile>
232+
<id>java11</id>
233+
<activation>
234+
<jdk>11</jdk>
235+
</activation>
236+
<properties>
237+
<java.version>11</java.version>
238+
<maven.compiler.source>11</maven.compiler.source>
239+
<maven.compiler.target>11</maven.compiler.target>
240+
<json-doclet.artifactId>spring-auto-restdocs-json-doclet-jdk9</json-doclet.artifactId>
241+
</properties>
242+
<modules>
243+
<module>spring-auto-restdocs-json-doclet-jdk9</module>
244+
<module>spring-auto-restdocs-annotations</module>
245+
<module>spring-auto-restdocs-core</module>
246+
<module>spring-auto-restdocs-docs</module>
247+
</modules>
248+
</profile>
213249
<profile>
214250
<id>sign-artifacts</id>
215251
<activation>

samples/java-webflux/pom.xml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,16 +126,42 @@
126126
<json-doclet.artifactId>spring-auto-restdocs-json-doclet-jdk9</json-doclet.artifactId>
127127
</properties>
128128
</profile>
129+
<profile>
130+
<id>java10</id>
131+
<activation>
132+
<jdk>10</jdk>
133+
</activation>
134+
<properties>
135+
<java.version>10</java.version>
136+
<maven.compiler.source>10</maven.compiler.source>
137+
<maven.compiler.target>10</maven.compiler.target>
138+
<json-doclet.artifactId>spring-auto-restdocs-json-doclet-jdk9</json-doclet.artifactId>
139+
</properties>
140+
</profile>
141+
<profile>
142+
<id>java11</id>
143+
<activation>
144+
<jdk>11</jdk>
145+
</activation>
146+
<properties>
147+
<java.version>11</java.version>
148+
<maven.compiler.source>11</maven.compiler.source>
149+
<maven.compiler.target>11</maven.compiler.target>
150+
<json-doclet.artifactId>spring-auto-restdocs-json-doclet-jdk9</json-doclet.artifactId>
151+
</properties>
152+
</profile>
129153
</profiles>
130154

131155
<build>
132156
<plugins>
133157
<plugin>
134158
<groupId>org.springframework.boot</groupId>
135159
<artifactId>spring-boot-maven-plugin</artifactId>
160+
<version>2.1.0.RELEASE</version>
136161
</plugin>
137162
<plugin>
138163
<artifactId>maven-surefire-plugin</artifactId>
164+
<version>2.22.1</version>
139165
<configuration>
140166
<includes>
141167
<include>**/*Test.java</include>
@@ -166,6 +192,7 @@
166192
</plugin>
167193
<plugin>
168194
<artifactId>maven-resources-plugin</artifactId>
195+
<version>3.1.0</version>
169196
<executions>
170197
<execution>
171198
<id>copy-index-public</id>
@@ -205,6 +232,7 @@
205232
<plugin>
206233
<groupId>org.apache.maven.plugins</groupId>
207234
<artifactId>maven-source-plugin</artifactId>
235+
<version>3.0.1</version>
208236
<executions>
209237
<execution>
210238
<id>attach-sources</id>
@@ -216,6 +244,7 @@
216244
</plugin>
217245
<plugin>
218246
<artifactId>maven-javadoc-plugin</artifactId>
247+
<version>3.0.1</version>
219248
<extensions>true</extensions>
220249
<executions>
221250
<execution>

samples/java-webmvc/build.gradle

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ version = "0.0.1-SNAPSHOT"
2424

2525
description = """Spring Auto REST Docs Java Web MVC Example Project"""
2626

27-
sourceCompatibility = 1.8
28-
targetCompatibility = 1.8
29-
3027
tasks.withType(JavaCompile) {
3128
options.encoding = "UTF-8"
3229
}
@@ -62,7 +59,16 @@ dependencies {
6259
testCompile "com.jayway.jsonpath:json-path-assert"
6360
testCompile "org.springframework.restdocs:spring-restdocs-core:$springRestDocsVersion"
6461
testCompile "org.springframework.restdocs:spring-restdocs-mockmvc:$springRestDocsVersion"
65-
jsondoclet "capital.scalable:spring-auto-restdocs-json-doclet:$springAutoRestDocsVersion"
62+
// Java 11 fix for https://stackoverflow.com/questions/43574426/how-to-resolve-java-lang-noclassdeffounderror-javax-xml-bind-jaxbexception-in-j
63+
testCompile "javax.xml.bind:jaxb-api:2.2.11"
64+
testCompile "com.sun.xml.bind:jaxb-core:2.2.11"
65+
testCompile "com.sun.xml.bind:jaxb-impl:2.2.11"
66+
testCompile "javax.activation:activation:1.1.1"
67+
if (JavaVersion.current() == JavaVersion.VERSION_1_8) {
68+
jsondoclet "capital.scalable:spring-auto-restdocs-json-doclet:$springAutoRestDocsVersion"
69+
} else {
70+
jsondoclet "capital.scalable:spring-auto-restdocs-json-doclet-jdk9:$springAutoRestDocsVersion"
71+
}
6672
}
6773

6874
task jsonDoclet(type: Javadoc, dependsOn: compileJava) {

samples/java-webmvc/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip

samples/java-webmvc/pom.xml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,16 +138,42 @@
138138
<json-doclet.artifactId>spring-auto-restdocs-json-doclet-jdk9</json-doclet.artifactId>
139139
</properties>
140140
</profile>
141+
<profile>
142+
<id>java10</id>
143+
<activation>
144+
<jdk>10</jdk>
145+
</activation>
146+
<properties>
147+
<java.version>10</java.version>
148+
<maven.compiler.source>10</maven.compiler.source>
149+
<maven.compiler.target>10</maven.compiler.target>
150+
<json-doclet.artifactId>spring-auto-restdocs-json-doclet-jdk9</json-doclet.artifactId>
151+
</properties>
152+
</profile>
153+
<profile>
154+
<id>java11</id>
155+
<activation>
156+
<jdk>11</jdk>
157+
</activation>
158+
<properties>
159+
<java.version>11</java.version>
160+
<maven.compiler.source>11</maven.compiler.source>
161+
<maven.compiler.target>11</maven.compiler.target>
162+
<json-doclet.artifactId>spring-auto-restdocs-json-doclet-jdk9</json-doclet.artifactId>
163+
</properties>
164+
</profile>
141165
</profiles>
142166

143167
<build>
144168
<plugins>
145169
<plugin>
146170
<groupId>org.springframework.boot</groupId>
147171
<artifactId>spring-boot-maven-plugin</artifactId>
172+
<version>2.1.0.RELEASE</version>
148173
</plugin>
149174
<plugin>
150175
<artifactId>maven-surefire-plugin</artifactId>
176+
<version>2.22.1</version>
151177
<configuration>
152178
<includes>
153179
<include>**/*Test.java</include>
@@ -178,6 +204,7 @@
178204
</plugin>
179205
<plugin>
180206
<artifactId>maven-resources-plugin</artifactId>
207+
<version>3.1.0</version>
181208
<executions>
182209
<execution>
183210
<id>copy-index-public</id>
@@ -217,6 +244,7 @@
217244
<plugin>
218245
<groupId>org.apache.maven.plugins</groupId>
219246
<artifactId>maven-source-plugin</artifactId>
247+
<version>3.0.1</version>
220248
<executions>
221249
<execution>
222250
<id>attach-sources</id>
@@ -228,6 +256,7 @@
228256
</plugin>
229257
<plugin>
230258
<artifactId>maven-javadoc-plugin</artifactId>
259+
<version>3.0.1</version>
231260
<extensions>true</extensions>
232261
<executions>
233262
<execution>

samples/kotlin-webmvc/build.gradle

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ version = "0.0.1-SNAPSHOT"
3535

3636
description = """Spring Auto REST Docs Kotlin Web MVC Example Project"""
3737

38-
sourceCompatibility = 1.8
39-
targetCompatibility = 1.8
40-
4138
tasks.withType(JavaCompile) {
4239
options.encoding = "UTF-8"
4340
}
@@ -70,7 +67,16 @@ dependencies {
7067
testCompile "com.jayway.jsonpath:json-path-assert"
7168
testCompile "org.springframework.restdocs:spring-restdocs-core:$springRestDocsVersion"
7269
testCompile "org.springframework.restdocs:spring-restdocs-mockmvc:$springRestDocsVersion"
73-
}
70+
// Java 11 fix for https://stackoverflow.com/questions/43574426/how-to-resolve-java-lang-noclassdeffounderror-javax-xml-bind-jaxbexception-in-j
71+
testCompile "javax.xml.bind:jaxb-api:2.2.11"
72+
testCompile "com.sun.xml.bind:jaxb-core:2.2.11"
73+
testCompile "com.sun.xml.bind:jaxb-impl:2.2.11"
74+
testCompile "javax.activation:activation:1.1.1"
75+
if (JavaVersion.current() == JavaVersion.VERSION_1_8) {
76+
testCompile "capital.scalable:spring-auto-restdocs-json-doclet:$springAutoRestDocsVersion"
77+
} else {
78+
testCompile "capital.scalable:spring-auto-restdocs-json-doclet-jdk9:$springAutoRestDocsVersion"
79+
}}
7480

7581
test {
7682
systemProperty "org.springframework.restdocs.outputDir", snippetsDir
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

samples/kotlin-webmvc/pom.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,11 @@
110110
<plugin>
111111
<groupId>org.springframework.boot</groupId>
112112
<artifactId>spring-boot-maven-plugin</artifactId>
113+
<version>2.1.0.RELEASE</version>
113114
</plugin>
114115
<plugin>
115116
<artifactId>maven-surefire-plugin</artifactId>
116-
<version>2.21.0</version>
117+
<version>2.22.1</version>
117118
<configuration>
118119
<includes>
119120
<include>**/*Test.*</include>
@@ -144,6 +145,7 @@
144145
</plugin>
145146
<plugin>
146147
<artifactId>maven-resources-plugin</artifactId>
148+
<version>3.1.0</version>
147149
<executions>
148150
<execution>
149151
<id>copy-index-public</id>
@@ -183,6 +185,7 @@
183185
<plugin>
184186
<groupId>org.apache.maven.plugins</groupId>
185187
<artifactId>maven-source-plugin</artifactId>
188+
<version>3.0.1</version>
186189
<executions>
187190
<execution>
188191
<id>attach-sources</id>
@@ -264,6 +267,7 @@
264267
<plugin>
265268
<groupId>org.apache.maven.plugins</groupId>
266269
<artifactId>maven-compiler-plugin</artifactId>
270+
<version>3.8.0</version>
267271
<executions>
268272
<!-- Replacing default-compile as it is treated specially by maven -->
269273
<execution>

samples/shared/pom.xml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,37 @@
7878
<json-doclet.artifactId>spring-auto-restdocs-json-doclet-jdk9</json-doclet.artifactId>
7979
</properties>
8080
</profile>
81+
<profile>
82+
<id>java10</id>
83+
<activation>
84+
<jdk>10</jdk>
85+
</activation>
86+
<properties>
87+
<java.version>10</java.version>
88+
<maven.compiler.source>10</maven.compiler.source>
89+
<maven.compiler.target>10</maven.compiler.target>
90+
<json-doclet.artifactId>spring-auto-restdocs-json-doclet-jdk9</json-doclet.artifactId>
91+
</properties>
92+
</profile>
93+
<profile>
94+
<id>java11</id>
95+
<activation>
96+
<jdk>11</jdk>
97+
</activation>
98+
<properties>
99+
<java.version>11</java.version>
100+
<maven.compiler.source>11</maven.compiler.source>
101+
<maven.compiler.target>11</maven.compiler.target>
102+
<json-doclet.artifactId>spring-auto-restdocs-json-doclet-jdk9</json-doclet.artifactId>
103+
</properties>
104+
</profile>
81105
</profiles>
82106

83107
<build>
84108
<plugins>
85109
<plugin>
86110
<artifactId>maven-source-plugin</artifactId>
111+
<version>3.0.1</version>
87112
<executions>
88113
<execution>
89114
<id>attach-sources</id>

0 commit comments

Comments
 (0)