List of usage examples for org.springframework.boot.loader.tools Layouts.None Layouts.None
Layouts.None
From source file:org.springframework.boot.loader.tools.RepackagerTests.java
@Test public void noMainClassAndLayoutIsNone() throws Exception { this.testJarFile.addClass("a/b/C.class", ClassWithMainMethod.class); File file = this.testJarFile.getFile(); Repackager repackager = new Repackager(file); repackager.setLayout(new Layouts.None()); repackager.repackage(file, NO_LIBRARIES); Manifest actualManifest = getManifest(file); assertThat(actualManifest.getMainAttributes().getValue("Main-Class")).isEqualTo("a.b.C"); assertThat(hasLauncherClasses(file)).isFalse(); }
From source file:org.springframework.boot.loader.tools.RepackagerTests.java
@Test public void noMainClassAndLayoutIsNoneWithNoMain() throws Exception { this.testJarFile.addClass("a/b/C.class", ClassWithoutMainMethod.class); File file = this.testJarFile.getFile(); Repackager repackager = new Repackager(file); repackager.setLayout(new Layouts.None()); repackager.repackage(file, NO_LIBRARIES); Manifest actualManifest = getManifest(file); assertThat(actualManifest.getMainAttributes().getValue("Main-Class")).isNull(); assertThat(hasLauncherClasses(file)).isFalse(); }