From da56bfea6ee74b5fed348d20eac4c8b87a2e23ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Nicoll?= Date: Mon, 22 Dec 2025 08:36:52 +0100 Subject: [PATCH] Remove support for the deprecated layertools jar mode Closes gh-48568 --- .../AbstractBootArchiveIntegrationTests.java | 24 ++-- .../bundling/AbstractBootArchiveTests.java | 16 +-- .../boot/jarmode/tools/LayerToolsJarMode.java | 56 -------- .../boot/jarmode/tools/package-info.java | 2 +- .../main/resources/META-INF/spring.factories | 1 - .../jarmode/tools/LayerToolsJarModeTests.java | 134 ------------------ ...ayertools-error-command-unknown-output.txt | 10 -- ...ools-error-option-missing-value-output.txt | 11 -- ...layertools-error-option-unknown-output.txt | 11 -- .../jarmode/tools/layertools-help-output.txt | 8 -- .../jarmode/tools/layertools-list-output.txt | 5 - 11 files changed, 21 insertions(+), 257 deletions(-) delete mode 100644 loader/spring-boot-jarmode-tools/src/main/java/org/springframework/boot/jarmode/tools/LayerToolsJarMode.java delete mode 100644 loader/spring-boot-jarmode-tools/src/test/java/org/springframework/boot/jarmode/tools/LayerToolsJarModeTests.java delete mode 100644 loader/spring-boot-jarmode-tools/src/test/resources/org/springframework/boot/jarmode/tools/layertools-error-command-unknown-output.txt delete mode 100644 loader/spring-boot-jarmode-tools/src/test/resources/org/springframework/boot/jarmode/tools/layertools-error-option-missing-value-output.txt delete mode 100644 loader/spring-boot-jarmode-tools/src/test/resources/org/springframework/boot/jarmode/tools/layertools-error-option-unknown-output.txt delete mode 100644 loader/spring-boot-jarmode-tools/src/test/resources/org/springframework/boot/jarmode/tools/layertools-help-output.txt delete mode 100644 loader/spring-boot-jarmode-tools/src/test/resources/org/springframework/boot/jarmode/tools/layertools-list-output.txt diff --git a/build-plugin/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/AbstractBootArchiveIntegrationTests.java b/build-plugin/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/AbstractBootArchiveIntegrationTests.java index 07a87874231..4e398951651 100644 --- a/build-plugin/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/AbstractBootArchiveIntegrationTests.java +++ b/build-plugin/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/AbstractBootArchiveIntegrationTests.java @@ -333,9 +333,9 @@ abstract class AbstractBootArchiveIntegrationTests { assertThat(task).isNotNull(); assertThat(task.getOutcome()).isEqualTo(TaskOutcome.SUCCESS); Map> indexedLayers; - String layerToolsJar = this.libPath + JarModeLibrary.TOOLS.getName(); + String toolsJar = this.libPath + JarModeLibrary.TOOLS.getName(); try (JarFile jarFile = new JarFile(new File(this.gradleBuild.getProjectDir(), "build/libs").listFiles()[0])) { - assertThat(jarFile.getEntry(layerToolsJar)).isNotNull(); + assertThat(jarFile.getEntry(toolsJar)).isNotNull(); assertThat(jarFile.getEntry(this.libPath + "commons-lang3-3.9.jar")).isNotNull(); assertThat(jarFile.getEntry(this.libPath + "spring-core-5.2.5.RELEASE.jar")).isNotNull(); assertThat(jarFile.getEntry(this.libPath + "spring-jcl-5.2.5.RELEASE.jar")).isNotNull(); @@ -360,7 +360,7 @@ abstract class AbstractBootArchiveIntegrationTests { expectedDependencies.add(this.libPath + "spring-boot-starter-logging-2.2.0.RELEASE.jar"); Set expectedSnapshotDependencies = new TreeSet<>(); expectedSnapshotDependencies.add(this.libPath + "library-1.0-SNAPSHOT.jar"); - (layerToolsJar.contains("SNAPSHOT") ? expectedSnapshotDependencies : expectedDependencies).add(layerToolsJar); + (toolsJar.contains("SNAPSHOT") ? expectedSnapshotDependencies : expectedDependencies).add(toolsJar); assertThat(indexedLayers.get("dependencies")).containsExactlyElementsOf(expectedDependencies); assertThat(indexedLayers.get("spring-boot-loader")).containsExactly("org/"); assertThat(indexedLayers.get("snapshot-dependencies")).containsExactlyElementsOf(expectedSnapshotDependencies); @@ -390,9 +390,9 @@ abstract class AbstractBootArchiveIntegrationTests { assertThat(task).isNotNull(); assertThat(task.getOutcome()).isEqualTo(TaskOutcome.SUCCESS); Map> indexedLayers; - String layerToolsJar = this.libPath + JarModeLibrary.TOOLS.getName(); + String toolsJar = this.libPath + JarModeLibrary.TOOLS.getName(); try (JarFile jarFile = new JarFile(new File(this.gradleBuild.getProjectDir(), "build/libs").listFiles()[0])) { - assertThat(jarFile.getEntry(layerToolsJar)).isNotNull(); + assertThat(jarFile.getEntry(toolsJar)).isNotNull(); assertThat(jarFile.getEntry(this.libPath + "alpha-1.2.3.jar")).isNotNull(); assertThat(jarFile.getEntry(this.libPath + "bravo-1.2.3.jar")).isNotNull(); assertThat(jarFile.getEntry(this.libPath + "charlie-1.2.3.jar")).isNotNull(); @@ -413,7 +413,7 @@ abstract class AbstractBootArchiveIntegrationTests { expectedDependencies.add(this.libPath + "spring-jcl-5.2.5.RELEASE.jar"); Set expectedSnapshotDependencies = new TreeSet<>(); expectedSnapshotDependencies.add(this.libPath + "library-1.0-SNAPSHOT.jar"); - (layerToolsJar.contains("SNAPSHOT") ? expectedSnapshotDependencies : expectedDependencies).add(layerToolsJar); + (toolsJar.contains("SNAPSHOT") ? expectedSnapshotDependencies : expectedDependencies).add(toolsJar); assertThat(indexedLayers.get("dependencies")).containsExactlyElementsOf(expectedDependencies); assertThat(indexedLayers.get("spring-boot-loader")).containsExactly("org/"); assertThat(indexedLayers.get("snapshot-dependencies")).containsExactlyElementsOf(expectedSnapshotDependencies); @@ -442,9 +442,9 @@ abstract class AbstractBootArchiveIntegrationTests { assertThat(task).isNotNull(); assertThat(task.getOutcome()).isEqualTo(TaskOutcome.SUCCESS); Map> indexedLayers; - String layerToolsJar = this.libPath + JarModeLibrary.TOOLS.getName(); + String toolsJar = this.libPath + JarModeLibrary.TOOLS.getName(); try (JarFile jarFile = new JarFile(new File(this.gradleBuild.getProjectDir(), "build/libs").listFiles()[0])) { - assertThat(jarFile.getEntry(layerToolsJar)).isNotNull(); + assertThat(jarFile.getEntry(toolsJar)).isNotNull(); assertThat(jarFile.getEntry(this.libPath + "commons-lang3-3.9.jar")).isNotNull(); assertThat(jarFile.getEntry(this.libPath + "spring-core-5.2.5.RELEASE.jar")).isNotNull(); assertThat(jarFile.getEntry(this.libPath + "spring-jcl-5.2.5.RELEASE.jar")).isNotNull(); @@ -462,7 +462,7 @@ abstract class AbstractBootArchiveIntegrationTests { expectedDependencies.add(this.libPath + "spring-jcl-5.2.5.RELEASE.jar"); List expectedSnapshotDependencies = new ArrayList<>(); expectedSnapshotDependencies.add(this.libPath + "library-1.0-SNAPSHOT.jar"); - (layerToolsJar.contains("SNAPSHOT") ? expectedSnapshotDependencies : expectedDependencies).add(layerToolsJar); + (toolsJar.contains("SNAPSHOT") ? expectedSnapshotDependencies : expectedDependencies).add(toolsJar); assertThat(indexedLayers.get("dependencies")).containsExactlyElementsOf(expectedDependencies); assertThat(indexedLayers.get("commons-dependencies")).containsExactly(this.libPath + "commons-lang3-3.9.jar"); assertThat(indexedLayers.get("snapshot-dependencies")).containsExactlyElementsOf(expectedSnapshotDependencies); @@ -495,9 +495,9 @@ abstract class AbstractBootArchiveIntegrationTests { assertThat(task).isNotNull(); assertThat(task.getOutcome()).isEqualTo(TaskOutcome.SUCCESS); Map> indexedLayers; - String layerToolsJar = this.libPath + JarModeLibrary.TOOLS.getName(); + String toolsJar = this.libPath + JarModeLibrary.TOOLS.getName(); try (JarFile jarFile = new JarFile(new File(this.gradleBuild.getProjectDir(), "build/libs").listFiles()[0])) { - assertThat(jarFile.getEntry(layerToolsJar)).isNotNull(); + assertThat(jarFile.getEntry(toolsJar)).isNotNull(); assertThat(jarFile.getEntry(this.libPath + "alpha-1.2.3.jar")).isNotNull(); assertThat(jarFile.getEntry(this.libPath + "bravo-1.2.3.jar")).isNotNull(); assertThat(jarFile.getEntry(this.libPath + "charlie-1.2.3.jar")).isNotNull(); @@ -522,7 +522,7 @@ abstract class AbstractBootArchiveIntegrationTests { expectedDependencies.add(this.libPath + "spring-jcl-5.2.5.RELEASE.jar"); List expectedSnapshotDependencies = new ArrayList<>(); expectedSnapshotDependencies.add(this.libPath + "library-1.0-SNAPSHOT.jar"); - (layerToolsJar.contains("SNAPSHOT") ? expectedSnapshotDependencies : expectedDependencies).add(layerToolsJar); + (toolsJar.contains("SNAPSHOT") ? expectedSnapshotDependencies : expectedDependencies).add(toolsJar); assertThat(indexedLayers.get("subproject-dependencies")) .containsExactlyElementsOf(expectedSubprojectDependencies); assertThat(indexedLayers.get("dependencies")).containsExactlyElementsOf(expectedDependencies); diff --git a/build-plugin/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/AbstractBootArchiveTests.java b/build-plugin/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/AbstractBootArchiveTests.java index 5ab4e610a86..10f9eaf5c00 100644 --- a/build-plugin/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/AbstractBootArchiveTests.java +++ b/build-plugin/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/AbstractBootArchiveTests.java @@ -488,22 +488,22 @@ abstract class AbstractBootArchiveTests { List index = entryLines(jarFile, this.indexPath + "layers.idx"); assertThat(getLayerNames(index)).containsExactly("dependencies", "spring-boot-loader", "snapshot-dependencies", "application"); - String layerToolsJar = this.libPath + JarModeLibrary.TOOLS.getName(); + String toolsJar = this.libPath + JarModeLibrary.TOOLS.getName(); List expected = new ArrayList<>(); expected.add("- \"dependencies\":"); expected.add(" - \"" + this.libPath + "first-library.jar\""); expected.add(" - \"" + this.libPath + "first-project-library.jar\""); expected.add(" - \"" + this.libPath + "fourth-library.jar\""); expected.add(" - \"" + this.libPath + "second-library.jar\""); - if (!layerToolsJar.contains("SNAPSHOT")) { - expected.add(" - \"" + layerToolsJar + "\""); + if (!toolsJar.contains("SNAPSHOT")) { + expected.add(" - \"" + toolsJar + "\""); } expected.add("- \"spring-boot-loader\":"); expected.add(" - \"org/\""); expected.add("- \"snapshot-dependencies\":"); expected.add(" - \"" + this.libPath + "second-project-library-SNAPSHOT.jar\""); - if (layerToolsJar.contains("SNAPSHOT")) { - expected.add(" - \"" + layerToolsJar + "\""); + if (toolsJar.contains("SNAPSHOT")) { + expected.add(" - \"" + toolsJar + "\""); } expected.add(" - \"" + this.libPath + "third-library-SNAPSHOT.jar\""); expected.add("- \"application\":"); @@ -542,10 +542,10 @@ abstract class AbstractBootArchiveTests { List index = entryLines(jarFile, this.indexPath + "layers.idx"); assertThat(getLayerNames(index)).containsExactly("my-deps", "my-internal-deps", "my-snapshot-deps", "resources", "application"); - String layerToolsJar = this.libPath + JarModeLibrary.TOOLS.getName(); + String toolsJar = this.libPath + JarModeLibrary.TOOLS.getName(); List expected = new ArrayList<>(); expected.add("- \"my-deps\":"); - expected.add(" - \"" + layerToolsJar + "\""); + expected.add(" - \"" + toolsJar + "\""); expected.add("- \"my-internal-deps\":"); expected.add(" - \"" + this.libPath + "first-library.jar\""); expected.add(" - \"" + this.libPath + "first-project-library.jar\""); @@ -570,7 +570,7 @@ abstract class AbstractBootArchiveTests { } @Test - void whenArchiveIsLayeredThenLayerToolsAreAddedToTheJar() throws IOException { + void whenArchiveIsLayeredThenToolsJarIsIncluded() throws IOException { List entryNames = getEntryNames(createLayeredJar()); assertThat(entryNames).contains(this.libPath + JarModeLibrary.TOOLS.getName()); } diff --git a/loader/spring-boot-jarmode-tools/src/main/java/org/springframework/boot/jarmode/tools/LayerToolsJarMode.java b/loader/spring-boot-jarmode-tools/src/main/java/org/springframework/boot/jarmode/tools/LayerToolsJarMode.java deleted file mode 100644 index c1663c64871..00000000000 --- a/loader/spring-boot-jarmode-tools/src/main/java/org/springframework/boot/jarmode/tools/LayerToolsJarMode.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2012-present the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.boot.jarmode.tools; - -import java.util.List; - -import org.jspecify.annotations.Nullable; - -import org.springframework.boot.loader.jarmode.JarMode; - -/** - * {@link JarMode} providing {@code "layertools"} support. - * - * @author Phillip Webb - * @author Scott Frederick - * @since 2.3.0 - */ -public class LayerToolsJarMode implements JarMode { - - static @Nullable Context contextOverride; - - @Override - public boolean accepts(String mode) { - return "layertools".equalsIgnoreCase(mode); - } - - @Override - public void run(String mode, String[] args) { - try { - Context context = (contextOverride != null) ? contextOverride : new Context(); - new Runner(System.out, context, getCommands(context)).run(args); - } - catch (Exception ex) { - throw new IllegalStateException(ex); - } - } - - static List getCommands(Context context) { - return List.of(new ListCommand(context), new ExtractLayersCommand(context)); - } - -} diff --git a/loader/spring-boot-jarmode-tools/src/main/java/org/springframework/boot/jarmode/tools/package-info.java b/loader/spring-boot-jarmode-tools/src/main/java/org/springframework/boot/jarmode/tools/package-info.java index d818f3fd838..3430de91380 100644 --- a/loader/spring-boot-jarmode-tools/src/main/java/org/springframework/boot/jarmode/tools/package-info.java +++ b/loader/spring-boot-jarmode-tools/src/main/java/org/springframework/boot/jarmode/tools/package-info.java @@ -15,7 +15,7 @@ */ /** - * JarMode support for layertools and tools. + * JarMode support for application tools. */ @NullMarked package org.springframework.boot.jarmode.tools; diff --git a/loader/spring-boot-jarmode-tools/src/main/resources/META-INF/spring.factories b/loader/spring-boot-jarmode-tools/src/main/resources/META-INF/spring.factories index bc571075c5f..80cad5b666a 100644 --- a/loader/spring-boot-jarmode-tools/src/main/resources/META-INF/spring.factories +++ b/loader/spring-boot-jarmode-tools/src/main/resources/META-INF/spring.factories @@ -1,4 +1,3 @@ # Jar Modes org.springframework.boot.loader.jarmode.JarMode=\ -org.springframework.boot.jarmode.tools.LayerToolsJarMode,\ org.springframework.boot.jarmode.tools.ToolsJarMode diff --git a/loader/spring-boot-jarmode-tools/src/test/java/org/springframework/boot/jarmode/tools/LayerToolsJarModeTests.java b/loader/spring-boot-jarmode-tools/src/test/java/org/springframework/boot/jarmode/tools/LayerToolsJarModeTests.java deleted file mode 100644 index 2fa8507ba6c..00000000000 --- a/loader/spring-boot-jarmode-tools/src/test/java/org/springframework/boot/jarmode/tools/LayerToolsJarModeTests.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright 2012-present the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.boot.jarmode.tools; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.InputStreamReader; -import java.io.OutputStreamWriter; -import java.io.PrintStream; -import java.io.Writer; -import java.nio.charset.StandardCharsets; -import java.util.jar.JarEntry; -import java.util.zip.ZipOutputStream; - -import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.io.TempDir; - -import org.springframework.core.io.ClassPathResource; -import org.springframework.util.FileCopyUtils; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.mockito.BDDMockito.given; -import static org.mockito.Mockito.mock; - -/** - * Tests for {@link LayerToolsJarMode}. - * - * @author Phillip Webb - * @author Scott Frederick - */ -class LayerToolsJarModeTests { - - private static final String[] NO_ARGS = {}; - - private TestPrintStream out; - - private PrintStream systemOut; - - @TempDir - @SuppressWarnings("NullAway.Init") - File temp; - - @BeforeEach - void setup() throws Exception { - Context context = mock(Context.class); - given(context.getArchiveFile()).willReturn(createJarFile("test.jar")); - this.out = new TestPrintStream(this); - this.systemOut = System.out; - System.setOut(this.out); - LayerToolsJarMode.contextOverride = context; - System.setProperty("jarmode", "layertools"); - } - - @AfterEach - void restore() { - System.setOut(this.systemOut); - LayerToolsJarMode.contextOverride = null; - System.clearProperty("jarmode"); - } - - @Test - void mainWithNoParametersShowsHelp() { - new LayerToolsJarMode().run("layertools", NO_ARGS); - assertThat(this.out).hasSameContentAsResource("layertools-help-output.txt"); - } - - @Test - void mainWithArgRunsCommand() { - new LayerToolsJarMode().run("layertools", new String[] { "list" }); - assertThat(this.out).hasSameContentAsResource("layertools-list-output.txt"); - } - - @Test - void mainWithUnknownCommandShowsErrorAndHelp() { - new LayerToolsJarMode().run("layertools", new String[] { "invalid" }); - assertThat(this.out).hasSameContentAsResource("layertools-error-command-unknown-output.txt"); - } - - @Test - void mainWithUnknownOptionShowsErrorAndCommandHelp() { - new LayerToolsJarMode().run("layertools", new String[] { "extract", "--invalid" }); - assertThat(this.out).hasSameContentAsResource("layertools-error-option-unknown-output.txt"); - } - - @Test - void mainWithOptionMissingRequiredValueShowsErrorAndCommandHelp() { - new LayerToolsJarMode().run("layertools", new String[] { "extract", "--destination" }); - assertThat(this.out).hasSameContentAsResource("layertools-error-option-missing-value-output.txt"); - } - - private File createJarFile(String name) throws Exception { - File file = new File(this.temp, name); - try (ZipOutputStream jarOutputStream = new ZipOutputStream(new FileOutputStream(file))) { - jarOutputStream.putNextEntry(new JarEntry("META-INF/MANIFEST.MF")); - jarOutputStream.write(getFile("test-manifest.MF").getBytes()); - jarOutputStream.closeEntry(); - JarEntry indexEntry = new JarEntry("BOOT-INF/layers.idx"); - jarOutputStream.putNextEntry(indexEntry); - Writer writer = new OutputStreamWriter(jarOutputStream, StandardCharsets.UTF_8); - writer.write("- \"0001\":\n"); - writer.write(" - \"BOOT-INF/lib/a.jar\"\n"); - writer.write(" - \"BOOT-INF/lib/b.jar\"\n"); - writer.write("- \"0002\":\n"); - writer.write(" - \"0002 BOOT-INF/lib/c.jar\"\n"); - writer.write("- \"0003\":\n"); - writer.write(" - \"BOOT-INF/lib/d.jar\"\n"); - writer.flush(); - } - return file; - } - - private String getFile(String fileName) throws Exception { - ClassPathResource resource = new ClassPathResource(fileName, getClass()); - InputStreamReader reader = new InputStreamReader(resource.getInputStream()); - return FileCopyUtils.copyToString(reader); - } - -} diff --git a/loader/spring-boot-jarmode-tools/src/test/resources/org/springframework/boot/jarmode/tools/layertools-error-command-unknown-output.txt b/loader/spring-boot-jarmode-tools/src/test/resources/org/springframework/boot/jarmode/tools/layertools-error-command-unknown-output.txt deleted file mode 100644 index 425ac1025e3..00000000000 --- a/loader/spring-boot-jarmode-tools/src/test/resources/org/springframework/boot/jarmode/tools/layertools-error-command-unknown-output.txt +++ /dev/null @@ -1,10 +0,0 @@ -Error: Unknown command "invalid" - -Usage: - java -Djarmode=layertools -jar test.jar - -Available commands: - help Help about any command -Deprecated commands: - list List layers from the jar that can be extracted - extract Extracts layers from the jar for image creation diff --git a/loader/spring-boot-jarmode-tools/src/test/resources/org/springframework/boot/jarmode/tools/layertools-error-option-missing-value-output.txt b/loader/spring-boot-jarmode-tools/src/test/resources/org/springframework/boot/jarmode/tools/layertools-error-option-missing-value-output.txt deleted file mode 100644 index 18e87069ce0..00000000000 --- a/loader/spring-boot-jarmode-tools/src/test/resources/org/springframework/boot/jarmode/tools/layertools-error-option-missing-value-output.txt +++ /dev/null @@ -1,11 +0,0 @@ -Warning: This command is deprecated. Use '-Djarmode=tools extract --layers --launcher' instead. - -Error: Option "--destination" for the extract command requires a value - -Extracts layers from the jar for image creation - -Usage: - java -Djarmode=layertools -jar test.jar extract [options] [...] - -Options: - --destination string The destination to extract files to diff --git a/loader/spring-boot-jarmode-tools/src/test/resources/org/springframework/boot/jarmode/tools/layertools-error-option-unknown-output.txt b/loader/spring-boot-jarmode-tools/src/test/resources/org/springframework/boot/jarmode/tools/layertools-error-option-unknown-output.txt deleted file mode 100644 index 3b832dd642e..00000000000 --- a/loader/spring-boot-jarmode-tools/src/test/resources/org/springframework/boot/jarmode/tools/layertools-error-option-unknown-output.txt +++ /dev/null @@ -1,11 +0,0 @@ -Warning: This command is deprecated. Use '-Djarmode=tools extract --layers --launcher' instead. - -Error: Unknown option "--invalid" for the extract command - -Extracts layers from the jar for image creation - -Usage: - java -Djarmode=layertools -jar test.jar extract [options] [...] - -Options: - --destination string The destination to extract files to diff --git a/loader/spring-boot-jarmode-tools/src/test/resources/org/springframework/boot/jarmode/tools/layertools-help-output.txt b/loader/spring-boot-jarmode-tools/src/test/resources/org/springframework/boot/jarmode/tools/layertools-help-output.txt deleted file mode 100644 index daea473a9b6..00000000000 --- a/loader/spring-boot-jarmode-tools/src/test/resources/org/springframework/boot/jarmode/tools/layertools-help-output.txt +++ /dev/null @@ -1,8 +0,0 @@ -Usage: - java -Djarmode=layertools -jar test.jar - -Available commands: - help Help about any command -Deprecated commands: - list List layers from the jar that can be extracted - extract Extracts layers from the jar for image creation diff --git a/loader/spring-boot-jarmode-tools/src/test/resources/org/springframework/boot/jarmode/tools/layertools-list-output.txt b/loader/spring-boot-jarmode-tools/src/test/resources/org/springframework/boot/jarmode/tools/layertools-list-output.txt deleted file mode 100644 index 03f7f88556f..00000000000 --- a/loader/spring-boot-jarmode-tools/src/test/resources/org/springframework/boot/jarmode/tools/layertools-list-output.txt +++ /dev/null @@ -1,5 +0,0 @@ -Warning: This command is deprecated. Use '-Djarmode=tools list-layers' instead. - -0001 -0002 -0003