Example usage for org.springframework.boot.loader.tools Layouts.Jar Layouts.Jar

List of usage examples for org.springframework.boot.loader.tools Layouts.Jar Layouts.Jar

Introduction

In this page you can find the example usage for org.springframework.boot.loader.tools Layouts.Jar Layouts.Jar.

Prototype

Layouts.Jar

Source Link

Usage

From source file:org.springframework.boot.loader.tools.RepackagerTests.java

@Test
public void customLayoutFactoryWithLayout() throws Exception {
    this.testJarFile.addClass("a/b/C.class", ClassWithMainMethod.class);
    File source = this.testJarFile.getFile();
    Repackager repackager = new Repackager(source, new TestLayoutFactory());
    repackager.setLayout(new Layouts.Jar());
    repackager.repackage(NO_LIBRARIES);//from   w ww  . j  av a2  s.  c o  m
    JarFile jarFile = new JarFile(source);
    assertThat(jarFile.getEntry("test")).isNull();
    jarFile.close();
}