Fix odd Java parsing issues
Update `LoggingMainClassTimeWarningListener` to import individual `Layout` inner classes. This fixes an odd javac parse issue that otherwise occurs. See gh-9316
This commit is contained in:
parent
c6f930b49e
commit
d588bf7506
|
|
@ -41,7 +41,10 @@ import org.springframework.boot.loader.tools.DefaultLaunchScript;
|
|||
import org.springframework.boot.loader.tools.LaunchScript;
|
||||
import org.springframework.boot.loader.tools.Layout;
|
||||
import org.springframework.boot.loader.tools.LayoutFactory;
|
||||
import org.springframework.boot.loader.tools.Layouts;
|
||||
import org.springframework.boot.loader.tools.Layouts.Expanded;
|
||||
import org.springframework.boot.loader.tools.Layouts.Jar;
|
||||
import org.springframework.boot.loader.tools.Layouts.None;
|
||||
import org.springframework.boot.loader.tools.Layouts.War;
|
||||
import org.springframework.boot.loader.tools.Libraries;
|
||||
import org.springframework.boot.loader.tools.Repackager;
|
||||
import org.springframework.boot.loader.tools.Repackager.MainClassTimeoutWarningListener;
|
||||
|
|
@ -323,48 +326,6 @@ public class RepackageMojo extends AbstractDependencyFilterMojo {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Archive layout types.
|
||||
*/
|
||||
public enum LayoutType {
|
||||
|
||||
/**
|
||||
* Jar Layout.
|
||||
*/
|
||||
JAR(new Layouts.Jar()),
|
||||
|
||||
/**
|
||||
* War Layout.
|
||||
*/
|
||||
WAR(new Layouts.War()),
|
||||
|
||||
/**
|
||||
* Zip Layout.
|
||||
*/
|
||||
ZIP(new Layouts.Expanded()),
|
||||
|
||||
/**
|
||||
* Dir Layout.
|
||||
*/
|
||||
DIR(new Layouts.Expanded()),
|
||||
|
||||
/**
|
||||
* No Layout.
|
||||
*/
|
||||
NONE(new Layouts.None());
|
||||
|
||||
private final Layout layout;
|
||||
|
||||
public Layout layout() {
|
||||
return this.layout;
|
||||
}
|
||||
|
||||
LayoutType(Layout layout) {
|
||||
this.layout = layout;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private class LoggingMainClassTimeoutWarningListener
|
||||
implements MainClassTimeoutWarningListener {
|
||||
|
||||
|
|
@ -376,4 +337,46 @@ public class RepackageMojo extends AbstractDependencyFilterMojo {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Archive layout types.
|
||||
*/
|
||||
public enum LayoutType {
|
||||
|
||||
/**
|
||||
* Jar Layout.
|
||||
*/
|
||||
JAR(new Jar()),
|
||||
|
||||
/**
|
||||
* War Layout.
|
||||
*/
|
||||
WAR(new War()),
|
||||
|
||||
/**
|
||||
* Zip Layout.
|
||||
*/
|
||||
ZIP(new Expanded()),
|
||||
|
||||
/**
|
||||
* Dir Layout.
|
||||
*/
|
||||
DIR(new Expanded()),
|
||||
|
||||
/**
|
||||
* No Layout.
|
||||
*/
|
||||
NONE(new None());
|
||||
|
||||
private final Layout layout;
|
||||
|
||||
LayoutType(Layout layout) {
|
||||
this.layout = layout;
|
||||
}
|
||||
|
||||
public Layout layout() {
|
||||
return this.layout;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue