Remove support for module layout
Closes gh-8107
This commit is contained in:
@@ -17,12 +17,9 @@
|
||||
package org.springframework.boot.loader.tools;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Common {@link Layout}s.
|
||||
@@ -156,40 +153,4 @@ public final class Layouts {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Module layout (designed to be used as a "plug-in").
|
||||
* @deprecated since 1.5 in favour of a custom {@link LayoutFactory}
|
||||
*/
|
||||
@Deprecated
|
||||
public static class Module implements Layout {
|
||||
|
||||
private static final Set<LibraryScope> LIB_DESTINATION_SCOPES = new HashSet<LibraryScope>(
|
||||
Arrays.asList(LibraryScope.COMPILE, LibraryScope.RUNTIME,
|
||||
LibraryScope.CUSTOM));
|
||||
|
||||
@Override
|
||||
public String getLauncherClassName() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLibraryDestination(String libraryName, LibraryScope scope) {
|
||||
if (LIB_DESTINATION_SCOPES.contains(scope)) {
|
||||
return "lib/";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getClassesLocation() {
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isExecutable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -86,18 +86,4 @@ public class LayoutsTests {
|
||||
.isEqualTo("WEB-INF/lib/");
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("deprecation")
|
||||
public void moduleLayout() throws Exception {
|
||||
Layout layout = new Layouts.Module();
|
||||
assertThat(layout.getLibraryDestination("lib.jar", LibraryScope.COMPILE))
|
||||
.isEqualTo("lib/");
|
||||
assertThat(layout.getLibraryDestination("lib.jar", LibraryScope.PROVIDED))
|
||||
.isNull();
|
||||
assertThat(layout.getLibraryDestination("lib.jar", LibraryScope.RUNTIME))
|
||||
.isEqualTo("lib/");
|
||||
assertThat(layout.getLibraryDestination("lib.jar", LibraryScope.CUSTOM))
|
||||
.isEqualTo("lib/");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user