@@ -105,14 +105,14 @@ private static String computeJavaHome(String generatorJavaHomeEnv, int minimumJa
105
105
int javaVersion ;
106
106
try {
107
107
java .lang .Process process = new ProcessBuilder (java .getAbsolutePath (), "--version" )
108
- .directory (bin )
109
- .redirectOutput (versionFile .toFile ())
110
- .start ();
108
+ .directory (bin )
109
+ .redirectOutput (versionFile .toFile ())
110
+ .start ();
111
111
process .waitFor (5 , SECONDS );
112
112
javaVersion = Integer .parseInt (Files .readAllLines (versionFile )
113
- .get (0 )
114
- .split ("\\ s" )[1 ]
115
- .split ("\\ ." )[0 ]);
113
+ .get (0 )
114
+ .split ("\\ s" )[1 ]
115
+ .split ("\\ ." )[0 ]);
116
116
} catch (InterruptedException e ) {
117
117
Thread .currentThread ().interrupt ();
118
118
throw new RuntimeException (e );
@@ -148,18 +148,18 @@ static void afterAll() throws Exception {
148
148
149
149
static VertxProject defaultProject () {
150
150
return new VertxProject ()
151
- .setId ("demo" )
152
- .setGroupId ("com.example" )
153
- .setArtifactId ("demo" )
154
- .setArchiveFormat (TGZ );
151
+ .setId ("demo" )
152
+ .setGroupId ("com.example" )
153
+ .setArtifactId ("demo" )
154
+ .setArchiveFormat (TGZ );
155
155
}
156
156
157
157
static Stream <VertxProject > testProjects () throws IOException {
158
158
List <String > versions = Util .loadStarterData ().getJsonArray ("versions" ).stream ()
159
- .map (JsonObject .class ::cast )
160
- .map (obj -> obj .getString ("number" ))
161
- .filter (version -> !version .endsWith ("-SNAPSHOT" ))
162
- .toList ();
159
+ .map (JsonObject .class ::cast )
160
+ .map (obj -> obj .getString ("number" ))
161
+ .filter (version -> !version .endsWith ("-SNAPSHOT" ))
162
+ .toList ();
163
163
164
164
List <Set <String >> testDeps = Arrays .asList (Collections .singleton ("vertx-unit" ),
165
165
Collections .singleton ("vertx-junit5" ));
@@ -170,11 +170,11 @@ static Stream<VertxProject> testProjects() throws IOException {
170
170
for (String version : versions ) {
171
171
for (Set <String > vertxDependencies : testDeps ) {
172
172
VertxProject vertxProject = defaultProject ()
173
- .setBuildTool (buildTool )
174
- .setLanguage (language )
175
- .setVertxVersion (version )
176
- .setVertxDependencies (new HashSet <>(vertxDependencies ))
177
- .setPackageName ("com.mycompany.project.special" );
173
+ .setBuildTool (buildTool )
174
+ .setLanguage (language )
175
+ .setVertxVersion (version )
176
+ .setVertxDependencies (new HashSet <>(vertxDependencies ))
177
+ .setPackageName ("com.mycompany.project.special" );
178
178
builder .add (vertxProject );
179
179
}
180
180
}
@@ -322,14 +322,14 @@ private void verifyGradleOutputFiles() throws IOException {
322
322
private void verifySourceFiles (Language language ) throws IOException {
323
323
try (Stream <Path > pathStream = Files .walk (workdir .resolve ("src/main/" + language .getName ()))) {
324
324
Optional <Path > verticleFile = pathStream
325
- .filter (p -> p .endsWith ("MainVerticle" + language .getExtension ()))
326
- .findFirst ();
325
+ .filter (p -> p .endsWith ("MainVerticle" + language .getExtension ()))
326
+ .findFirst ();
327
327
assertThat (verticleFile ).isPresent ().hasValueSatisfying (p -> assertThat (p ).isRegularFile ());
328
328
}
329
329
try (Stream <Path > pathStream = Files .walk (workdir .resolve ("src/test/" + language .getName ()))) {
330
330
Optional <Path > testFile = pathStream
331
- .filter (p -> p .endsWith ("TestMainVerticle" + language .getExtension ()))
332
- .findFirst ();
331
+ .filter (p -> p .endsWith ("TestMainVerticle" + language .getExtension ()))
332
+ .findFirst ();
333
333
assertThat (testFile ).isPresent ().hasValueSatisfying (p -> assertThat (p ).isRegularFile ());
334
334
}
335
335
}
@@ -343,22 +343,22 @@ private void buildProject(Vertx vertx, BuildTool buildTool, String javaHome, Han
343
343
if (buildTool == MAVEN ) {
344
344
command = "./mvnw" ;
345
345
args = Stream .<String >builder ()
346
- .add ("-Dmaven.repo.local=" + mavenRepository .toAbsolutePath ())
347
- .add ("-s" )
348
- .add (settingsFile .toAbsolutePath ().toString ())
349
- .add ("-B" )
350
- .add ("verify" )
351
- .build ()
352
- .collect (toList ());
346
+ .add ("-Dmaven.repo.local=" + mavenRepository .toAbsolutePath ())
347
+ .add ("-s" )
348
+ .add (settingsFile .toAbsolutePath ().toString ())
349
+ .add ("-B" )
350
+ .add ("verify" )
351
+ .build ()
352
+ .collect (toList ());
353
353
} else if (buildTool == GRADLE ) {
354
354
command = "./gradlew" ;
355
355
args = Stream .<String >builder ()
356
- .add ("--no-build-cache" )
357
- .add ("--no-daemon" )
358
- .add ("assemble" )
359
- .add ("check" )
360
- .build ()
361
- .collect (toList ());
356
+ .add ("--no-build-cache" )
357
+ .add ("--no-daemon" )
358
+ .add ("assemble" )
359
+ .add ("check" )
360
+ .build ()
361
+ .collect (toList ());
362
362
} else {
363
363
handler .handle (Future .failedFuture (unsupported (buildTool )));
364
364
return ;
@@ -399,13 +399,13 @@ private void runDevMode(Vertx vertx, BuildTool buildTool, String javaHome, Handl
399
399
Promise <Void > promise = Promise .promise ();
400
400
promise .future ().onComplete (handler );
401
401
RecordParser parser = RecordParser .newDelimited ("\n " )
402
- .exceptionHandler (promise ::tryFail )
403
- .handler (buffer -> {
404
- String line = buffer .toString ().trim ();
405
- if (line .contains ("HTTP server started on port 8888" )) {
406
- promise .tryComplete ();
407
- }
408
- });
402
+ .exceptionHandler (promise ::tryFail )
403
+ .handler (buffer -> {
404
+ String line = buffer .toString ().trim ();
405
+ if (line .contains ("HTTP server started on port 8888" )) {
406
+ promise .tryComplete ();
407
+ }
408
+ });
409
409
process .stdout ().exceptionHandler (promise ::tryFail ).handler (parser );
410
410
}).start ();
411
411
}
@@ -414,7 +414,7 @@ private void runDevMode(Vertx vertx, BuildTool buildTool, String javaHome, Handl
414
414
private void unpack (Vertx vertx , Path workdir , Buffer buffer , Handler <AsyncResult <Void >> handler ) {
415
415
vertx .<Void >executeBlocking (() -> {
416
416
try (ByteArrayInputStream bais = new ByteArrayInputStream (buffer .getBytes ());
417
- TarArchiveInputStream ais = new TarArchiveInputStream (new GzipCompressorInputStream (bais ))) {
417
+ TarArchiveInputStream ais = new TarArchiveInputStream (new GzipCompressorInputStream (bais ))) {
418
418
419
419
TarArchiveEntry entry ;
420
420
while ((entry = ais .getNextTarEntry ()) != null ) {
0 commit comments