Skip to content

Commit 7766264

Browse files
authored
Merge pull request #11204 from swagger-api/jdk16
2 parents 403e887 + ffb6c2f commit 7766264

File tree

5 files changed

+17
-5
lines changed

5 files changed

+17
-5
lines changed

.mvn/jvm.config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-XX:+IgnoreUnrecognizedVMOptions
2+
--add-opens=java.base/java.util=ALL-UNNAMED

modules/swagger-generator/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
<plugin>
5353
<groupId>org.apache.maven.plugins</groupId>
5454
<artifactId>maven-failsafe-plugin</artifactId>
55-
<version>2.22.0</version>
55+
<version>2.22.2</version>
5656
<configuration>
5757
<systemPropertyVariables>
5858
<java.security.policy>${java.security.policy}</java.security.policy>

modules/swagger-generator/src/test/java/io/swagger/v3/generator/online/GeneratorControllerIT.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import io.swagger.codegen.v3.service.GenerationRequest;
55
import io.swagger.codegen.v3.service.Options;
66
import io.swagger.v3.core.util.Json;
7-
import org.apache.commons.io.FileUtils;
87
import org.apache.commons.io.IOUtils;
98
import org.apache.http.HttpEntity;
109
import org.apache.http.HttpResponse;
@@ -18,7 +17,6 @@
1817
import org.testng.Assert;
1918
import org.testng.annotations.Test;
2019

21-
import java.io.File;
2220
import java.util.LinkedHashMap;
2321
import java.util.Map;
2422

@@ -161,7 +159,7 @@ public void testMultiTypesV2() throws Exception {
161159

162160
@Test
163161
public void generateJava() throws Exception {
164-
String json = FileUtils.readFileToString(new File("src/test/resources/petstore-oas3.json"));
162+
String json = IOUtils.toString(getClass().getClassLoader().getResourceAsStream("petstore-oas3.json"));
165163
JsonNode node = Json.mapper().readTree(json);
166164
Map<String, Object> spec = Json.mapper().convertValue(node, LinkedHashMap.class);
167165

@@ -188,7 +186,7 @@ public void generateJava() throws Exception {
188186
@Test
189187
public void generateHtml() throws Exception {
190188
HttpClient client = HttpClientBuilder.create().build();
191-
String json = FileUtils.readFileToString(new File("src/test/resources/petstore-oas3.json"));
189+
String json = IOUtils.toString(getClass().getClassLoader().getResourceAsStream("petstore-oas3.json"));
192190
JsonNode node = Json.mapper().readTree(json);
193191
Map<String, Object> spec = Json.mapper().convertValue(node, LinkedHashMap.class);
194192

pom.docker.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,11 @@
253253
<artifactId>formatter-maven-plugin</artifactId>
254254
<version>0.5.2</version>
255255
</plugin>
256+
<plugin>
257+
<groupId>org.apache.maven.plugins</groupId>
258+
<artifactId>maven-war-plugin</artifactId>
259+
<version>3.3.2</version>
260+
</plugin>
256261
</plugins>
257262
</pluginManagement>
258263
</build>

pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@
129129
<argLine>-XX:+StartAttachListener</argLine>
130130
<argLine>
131131
-javaagent:${settings.localRepository}/org/jmockit/jmockit/${jmockit-version}/jmockit-${jmockit-version}.jar
132+
-XX:+IgnoreUnrecognizedVMOptions
133+
--add-opens=java.base/java.util=ALL-UNNAMED
132134
</argLine>
133135
</configuration>
134136
<executions>
@@ -262,6 +264,11 @@
262264
<artifactId>formatter-maven-plugin</artifactId>
263265
<version>0.5.2</version>
264266
</plugin>
267+
<plugin>
268+
<groupId>org.apache.maven.plugins</groupId>
269+
<artifactId>maven-war-plugin</artifactId>
270+
<version>3.3.2</version>
271+
</plugin>
265272
</plugins>
266273
</pluginManagement>
267274
</build>

0 commit comments

Comments
 (0)