41
41
import org .springframework .boot .loader .tools .LaunchScript ;
42
42
import org .springframework .boot .loader .tools .Layout ;
43
43
import org .springframework .boot .loader .tools .LayoutFactory ;
44
- import org .springframework .boot .loader .tools .Layouts ;
44
+ import org .springframework .boot .loader .tools .Layouts .Expanded ;
45
+ import org .springframework .boot .loader .tools .Layouts .Jar ;
46
+ import org .springframework .boot .loader .tools .Layouts .None ;
47
+ import org .springframework .boot .loader .tools .Layouts .War ;
45
48
import org .springframework .boot .loader .tools .Libraries ;
46
49
import org .springframework .boot .loader .tools .Repackager ;
47
50
import org .springframework .boot .loader .tools .Repackager .MainClassTimeoutWarningListener ;
@@ -323,6 +326,17 @@ else if (!source.equals(repackaged)) {
323
326
}
324
327
}
325
328
329
+ private class LoggingMainClassTimeoutWarningListener
330
+ implements MainClassTimeoutWarningListener {
331
+
332
+ @ Override
333
+ public void handleTimeoutWarning (long duration , String mainMethod ) {
334
+ getLog ().warn ("Searching for the main-class is taking some time, "
335
+ + "consider using the mainClass configuration " + "parameter" );
336
+ }
337
+
338
+ }
339
+
326
340
/**
327
341
* Archive layout types.
328
342
*/
@@ -331,47 +345,36 @@ public enum LayoutType {
331
345
/**
332
346
* Jar Layout.
333
347
*/
334
- JAR (new Layouts . Jar ()),
348
+ JAR (new Jar ()),
335
349
336
350
/**
337
351
* War Layout.
338
352
*/
339
- WAR (new Layouts . War ()),
353
+ WAR (new War ()),
340
354
341
355
/**
342
356
* Zip Layout.
343
357
*/
344
- ZIP (new Layouts . Expanded ()),
358
+ ZIP (new Expanded ()),
345
359
346
360
/**
347
361
* Dir Layout.
348
362
*/
349
- DIR (new Layouts . Expanded ()),
363
+ DIR (new Expanded ()),
350
364
351
365
/**
352
366
* No Layout.
353
367
*/
354
- NONE (new Layouts . None ());
368
+ NONE (new None ());
355
369
356
370
private final Layout layout ;
357
371
358
- public Layout layout () {
359
- return this .layout ;
360
- }
361
-
362
372
LayoutType (Layout layout ) {
363
373
this .layout = layout ;
364
374
}
365
375
366
- }
367
-
368
- private class LoggingMainClassTimeoutWarningListener
369
- implements MainClassTimeoutWarningListener {
370
-
371
- @ Override
372
- public void handleTimeoutWarning (long duration , String mainMethod ) {
373
- getLog ().warn ("Searching for the main-class is taking some time, "
374
- + "consider using the mainClass configuration " + "parameter" );
376
+ public Layout layout () {
377
+ return this .layout ;
375
378
}
376
379
377
380
}
0 commit comments