Skip to content

Commit 793aca6

Browse files
committed
Implement extract and list-layers command
Adds a new jarmode called 'tools'. This provides two commands, 'extract' and 'list-layers'. list-layers is the same as list from the layertools. extract is able to extract the JAR in four different modes: - CDS compatible extraction with libraries in a lib folder and a runner .jar - CDS compatible as above, but with layers - Launcher based - Launcher based with layers. This is essentially the same as extract from the layertools The commands in layertools have been deprecated in favor of the commands in 'tools'. This also changes the behavior of layers.enabled from the Gradle and Maven plugin: before this commit, layers.enabled prevents the inclusion of the layer index file as well as the layertools JAR. After this commit, layers.enabled only prevents the inclusion of the layer index file. layer.includeLayerTools have been deprecated in favor of includeTools, and the layertools JAR has been renamed to tools. Closes gh-38276
1 parent 2c4fb5b commit 793aca6

File tree

121 files changed

+2780
-612
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+2780
-612
lines changed

settings.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ include "spring-boot-project:spring-boot-tools:spring-boot-configuration-metadat
5757
include "spring-boot-project:spring-boot-tools:spring-boot-configuration-processor"
5858
include "spring-boot-project:spring-boot-tools:spring-boot-gradle-plugin"
5959
include "spring-boot-project:spring-boot-tools:spring-boot-gradle-test-support"
60-
include "spring-boot-project:spring-boot-tools:spring-boot-jarmode-layertools"
60+
include "spring-boot-project:spring-boot-tools:spring-boot-jarmode-tools"
6161
include "spring-boot-project:spring-boot-tools:spring-boot-loader"
6262
include "spring-boot-project:spring-boot-tools:spring-boot-loader-classic"
6363
include "spring-boot-project:spring-boot-tools:spring-boot-loader-tools"

spring-boot-project/spring-boot-dependencies/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1612,7 +1612,7 @@ bom {
16121612
"spring-boot-configuration-processor",
16131613
"spring-boot-devtools",
16141614
"spring-boot-docker-compose",
1615-
"spring-boot-jarmode-layertools",
1615+
"spring-boot-jarmode-tools",
16161616
"spring-boot-loader",
16171617
"spring-boot-loader-classic",
16181618
"spring-boot-loader-tools",

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootArchive.java

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -39,6 +39,7 @@
3939
* A Spring Boot "fat" archive task.
4040
*
4141
* @author Andy Wilkinson
42+
* @author Moritz Halbritter
4243
* @since 2.0.0
4344
*/
4445
public interface BootArchive extends Task {
@@ -144,4 +145,13 @@ public interface BootArchive extends Task {
144145
@Optional
145146
Property<LoaderImplementation> getLoaderImplementation();
146147

148+
/**
149+
* Returns whether the JAR tools should be included as a dependency in the layered
150+
* archive.
151+
* @return whether the JAR tools should be included
152+
* @since 3.3.0
153+
*/
154+
@Input
155+
Property<Boolean> getIncludeTools();
156+
147157
}

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootArchiveSupport.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -129,7 +129,7 @@ CopyAction createCopyAction(Jar jar, ResolvedDependencies resolvedDependencies,
129129

130130
CopyAction createCopyAction(Jar jar, ResolvedDependencies resolvedDependencies,
131131
LoaderImplementation loaderImplementation, boolean supportsSignatureFile, LayerResolver layerResolver,
132-
String layerToolsLocation) {
132+
String jarmodeToolsLocation) {
133133
File output = jar.getArchiveFile().get().getAsFile();
134134
Manifest manifest = jar.getManifest();
135135
boolean preserveFileTimestamps = jar.isPreserveFileTimestamps();
@@ -143,7 +143,7 @@ CopyAction createCopyAction(Jar jar, ResolvedDependencies resolvedDependencies,
143143
Function<FileCopyDetails, ZipCompression> compressionResolver = this.compressionResolver;
144144
String encoding = jar.getMetadataCharset();
145145
CopyAction action = new BootZipCopyAction(output, manifest, preserveFileTimestamps, dirMode, fileMode,
146-
includeDefaultLoader, layerToolsLocation, requiresUnpack, exclusions, launchScript, librarySpec,
146+
includeDefaultLoader, jarmodeToolsLocation, requiresUnpack, exclusions, launchScript, librarySpec,
147147
compressionResolver, encoding, resolvedDependencies, supportsSignatureFile, layerResolver,
148148
loaderImplementation);
149149
return jar.isReproducibleFileOrder() ? new ReproducibleOrderingCopyAction(action) : action;

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootJar.java

+15-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -88,6 +88,7 @@ public BootJar() {
8888
this.projectName = project.provider(project::getName);
8989
this.projectVersion = project.provider(project::getVersion);
9090
this.resolvedDependencies = new ResolvedDependencies(project);
91+
getIncludeTools().convention(true);
9192
}
9293

9394
private void configureBootInfSpec(CopySpec bootInfSpec) {
@@ -144,13 +145,21 @@ private boolean isLayeredDisabled() {
144145
@Override
145146
protected CopyAction createCopyAction() {
146147
LoaderImplementation loaderImplementation = getLoaderImplementation().getOrElse(LoaderImplementation.DEFAULT);
148+
LayerResolver layerResolver = null;
147149
if (!isLayeredDisabled()) {
148-
LayerResolver layerResolver = new LayerResolver(this.resolvedDependencies, this.layered, this::isLibrary);
149-
String layerToolsLocation = this.layered.getIncludeLayerTools().get() ? LIB_DIRECTORY : null;
150-
return this.support.createCopyAction(this, this.resolvedDependencies, loaderImplementation, true,
151-
layerResolver, layerToolsLocation);
150+
layerResolver = new LayerResolver(this.resolvedDependencies, this.layered, this::isLibrary);
152151
}
153-
return this.support.createCopyAction(this, this.resolvedDependencies, loaderImplementation, true);
152+
String jarmodeToolsLocation = isIncludeJarmodeTools() ? LIB_DIRECTORY : null;
153+
return this.support.createCopyAction(this, this.resolvedDependencies, loaderImplementation, true, layerResolver,
154+
jarmodeToolsLocation);
155+
}
156+
157+
@SuppressWarnings("removal")
158+
private boolean isIncludeJarmodeTools() {
159+
if (!this.getIncludeTools().get()) {
160+
return false;
161+
}
162+
return this.layered.getIncludeLayerTools().get();
154163
}
155164

156165
@Override

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootWar.java

+15-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -87,6 +87,7 @@ public BootWar() {
8787
this.projectName = project.provider(project::getName);
8888
this.projectVersion = project.provider(project::getVersion);
8989
this.resolvedDependencies = new ResolvedDependencies(project);
90+
getIncludeTools().convention(true);
9091
}
9192

9293
private Object getProvidedLibFiles() {
@@ -118,13 +119,21 @@ private boolean isLayeredDisabled() {
118119
@Override
119120
protected CopyAction createCopyAction() {
120121
LoaderImplementation loaderImplementation = getLoaderImplementation().getOrElse(LoaderImplementation.DEFAULT);
122+
LayerResolver layerResolver = null;
121123
if (!isLayeredDisabled()) {
122-
LayerResolver layerResolver = new LayerResolver(this.resolvedDependencies, this.layered, this::isLibrary);
123-
String layerToolsLocation = this.layered.getIncludeLayerTools().get() ? LIB_DIRECTORY : null;
124-
return this.support.createCopyAction(this, this.resolvedDependencies, loaderImplementation, false,
125-
layerResolver, layerToolsLocation);
124+
layerResolver = new LayerResolver(this.resolvedDependencies, this.layered, this::isLibrary);
126125
}
127-
return this.support.createCopyAction(this, this.resolvedDependencies, loaderImplementation, false);
126+
String jarmodeToolsLocation = isIncludeJarmodeTools() ? LIB_DIRECTORY : null;
127+
return this.support.createCopyAction(this, this.resolvedDependencies, loaderImplementation, false,
128+
layerResolver, jarmodeToolsLocation);
129+
}
130+
131+
@SuppressWarnings("removal")
132+
private boolean isIncludeJarmodeTools() {
133+
if (!this.getIncludeTools().get()) {
134+
return false;
135+
}
136+
return this.layered.getIncludeLayerTools().get();
128137
}
129138

130139
@Override

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootZipCopyAction.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class BootZipCopyAction implements CopyAction {
9696

9797
private final boolean includeDefaultLoader;
9898

99-
private final String layerToolsLocation;
99+
private final String jarmodeToolsLocation;
100100

101101
private final Spec<FileTreeElement> requiresUnpack;
102102

@@ -119,7 +119,7 @@ class BootZipCopyAction implements CopyAction {
119119
private final LoaderImplementation loaderImplementation;
120120

121121
BootZipCopyAction(File output, Manifest manifest, boolean preserveFileTimestamps, Integer dirMode, Integer fileMode,
122-
boolean includeDefaultLoader, String layerToolsLocation, Spec<FileTreeElement> requiresUnpack,
122+
boolean includeDefaultLoader, String jarmodeToolsLocation, Spec<FileTreeElement> requiresUnpack,
123123
Spec<FileTreeElement> exclusions, LaunchScriptConfiguration launchScript, Spec<FileCopyDetails> librarySpec,
124124
Function<FileCopyDetails, ZipCompression> compressionResolver, String encoding,
125125
ResolvedDependencies resolvedDependencies, boolean supportsSignatureFile, LayerResolver layerResolver,
@@ -130,7 +130,7 @@ class BootZipCopyAction implements CopyAction {
130130
this.dirMode = dirMode;
131131
this.fileMode = fileMode;
132132
this.includeDefaultLoader = includeDefaultLoader;
133-
this.layerToolsLocation = layerToolsLocation;
133+
this.jarmodeToolsLocation = jarmodeToolsLocation;
134134
this.requiresUnpack = requiresUnpack;
135135
this.exclusions = exclusions;
136136
this.launchScript = launchScript;
@@ -342,8 +342,8 @@ private boolean isInMetaInf(FileCopyDetails details) {
342342
}
343343

344344
private void writeJarToolsIfNecessary() throws IOException {
345-
if (BootZipCopyAction.this.layerToolsLocation != null) {
346-
writeJarModeLibrary(BootZipCopyAction.this.layerToolsLocation, JarModeLibrary.LAYER_TOOLS);
345+
if (BootZipCopyAction.this.jarmodeToolsLocation != null) {
346+
writeJarModeLibrary(BootZipCopyAction.this.jarmodeToolsLocation, JarModeLibrary.TOOLS);
347347
}
348348
}
349349

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/LayeredSpec.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -72,8 +72,10 @@ public LayeredSpec(ObjectFactory objects) {
7272
* archive.
7373
* @return whether the layer tools should be included
7474
* @since 3.0.0
75+
* @deprecated since 3.3.0 for removal in 3.5.0 in favor of {@code includeTools}.
7576
*/
7677
@Input
78+
@Deprecated(since = "3.3.0", forRemoval = true)
7779
public abstract Property<Boolean> getIncludeLayerTools();
7880

7981
/**

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/AbstractBootArchiveIntegrationTests.java

+18-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -66,6 +66,7 @@
6666
* @author Andy Wilkinson
6767
* @author Madhura Bhave
6868
* @author Scott Frederick
69+
* @author Moritz Halbritter
6970
*/
7071
abstract class AbstractBootArchiveIntegrationTests {
7172

@@ -332,6 +333,18 @@ void notUpToDateWhenBuiltWithLayerToolsAndThenWithoutLayerTools() {
332333
.getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
333334
}
334335

336+
@TestTemplate
337+
void notUpToDateWhenBuiltWithToolsAndThenWithoutTools() {
338+
assertThat(this.gradleBuild.scriptProperty("includeTools", "")
339+
.build(this.taskName)
340+
.task(":" + this.taskName)
341+
.getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
342+
assertThat(this.gradleBuild.scriptProperty("includeTools", "includeTools = false")
343+
.build(this.taskName)
344+
.task(":" + this.taskName)
345+
.getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
346+
}
347+
335348
@TestTemplate
336349
void layersWithCustomSourceSet() {
337350
assertThat(this.gradleBuild.build(this.taskName).task(":" + this.taskName).getOutcome())
@@ -345,7 +358,7 @@ void implicitLayers() throws IOException {
345358
assertThat(this.gradleBuild.build(this.taskName).task(":" + this.taskName).getOutcome())
346359
.isEqualTo(TaskOutcome.SUCCESS);
347360
Map<String, List<String>> indexedLayers;
348-
String layerToolsJar = this.libPath + JarModeLibrary.LAYER_TOOLS.getName();
361+
String layerToolsJar = this.libPath + JarModeLibrary.TOOLS.getName();
349362
try (JarFile jarFile = new JarFile(new File(this.gradleBuild.getProjectDir(), "build/libs").listFiles()[0])) {
350363
assertThat(jarFile.getEntry(layerToolsJar)).isNotNull();
351364
assertThat(jarFile.getEntry(this.libPath + "commons-lang3-3.9.jar")).isNotNull();
@@ -397,7 +410,7 @@ void multiModuleImplicitLayers() throws IOException {
397410
assertThat(this.gradleBuild.build(this.taskName).task(":" + this.taskName).getOutcome())
398411
.isEqualTo(TaskOutcome.SUCCESS);
399412
Map<String, List<String>> indexedLayers;
400-
String layerToolsJar = this.libPath + JarModeLibrary.LAYER_TOOLS.getName();
413+
String layerToolsJar = this.libPath + JarModeLibrary.TOOLS.getName();
401414
try (JarFile jarFile = new JarFile(new File(this.gradleBuild.getProjectDir(), "build/libs").listFiles()[0])) {
402415
assertThat(jarFile.getEntry(layerToolsJar)).isNotNull();
403416
assertThat(jarFile.getEntry(this.libPath + "alpha-1.2.3.jar")).isNotNull();
@@ -443,7 +456,7 @@ void customLayers() throws IOException {
443456
BuildResult build = this.gradleBuild.build(this.taskName);
444457
assertThat(build.task(":" + this.taskName).getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
445458
Map<String, List<String>> indexedLayers;
446-
String layerToolsJar = this.libPath + JarModeLibrary.LAYER_TOOLS.getName();
459+
String layerToolsJar = this.libPath + JarModeLibrary.TOOLS.getName();
447460
try (JarFile jarFile = new JarFile(new File(this.gradleBuild.getProjectDir(), "build/libs").listFiles()[0])) {
448461
assertThat(jarFile.getEntry(layerToolsJar)).isNotNull();
449462
assertThat(jarFile.getEntry(this.libPath + "commons-lang3-3.9.jar")).isNotNull();
@@ -490,7 +503,7 @@ void multiModuleCustomLayers() throws IOException {
490503
BuildResult build = this.gradleBuild.build(this.taskName);
491504
assertThat(build.task(":" + this.taskName).getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
492505
Map<String, List<String>> indexedLayers;
493-
String layerToolsJar = this.libPath + JarModeLibrary.LAYER_TOOLS.getName();
506+
String layerToolsJar = this.libPath + JarModeLibrary.TOOLS.getName();
494507
try (JarFile jarFile = new JarFile(new File(this.gradleBuild.getProjectDir(), "build/libs").listFiles()[0])) {
495508
assertThat(jarFile.getEntry(layerToolsJar)).isNotNull();
496509
assertThat(jarFile.getEntry(this.libPath + "alpha-1.2.3.jar")).isNotNull();

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/AbstractBootArchiveTests.java

+25-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -80,6 +80,7 @@
8080
* @param <T> the type of the concrete BootArchive implementation
8181
* @author Andy Wilkinson
8282
* @author Scott Frederick
83+
* @author Moritz Halbritter
8384
*/
8485
abstract class AbstractBootArchiveTests<T extends Jar & BootArchive> {
8586

@@ -496,7 +497,7 @@ void archiveShouldBeLayeredByDefault() throws IOException {
496497
assertThat(jarFile.getManifest().getMainAttributes().getValue("Spring-Boot-Lib")).isEqualTo(this.libPath);
497498
assertThat(jarFile.getManifest().getMainAttributes().getValue("Spring-Boot-Layers-Index"))
498499
.isEqualTo(this.indexPath + "layers.idx");
499-
assertThat(getEntryNames(jarFile)).contains(this.libPath + JarModeLibrary.LAYER_TOOLS.getName());
500+
assertThat(getEntryNames(jarFile)).contains(this.libPath + JarModeLibrary.TOOLS.getName());
500501
}
501502
}
502503

@@ -530,7 +531,7 @@ void whenJarIsLayeredThenLayersIndexIsPresentAndCorrect() throws IOException {
530531
List<String> index = entryLines(jarFile, this.indexPath + "layers.idx");
531532
assertThat(getLayerNames(index)).containsExactly("dependencies", "spring-boot-loader",
532533
"snapshot-dependencies", "application");
533-
String layerToolsJar = this.libPath + JarModeLibrary.LAYER_TOOLS.getName();
534+
String layerToolsJar = this.libPath + JarModeLibrary.TOOLS.getName();
534535
List<String> expected = new ArrayList<>();
535536
expected.add("- \"dependencies\":");
536537
expected.add(" - \"" + this.libPath + "first-library.jar\"");
@@ -584,7 +585,7 @@ void whenJarIsLayeredWithCustomStrategiesThenLayersIndexIsPresentAndCorrect() th
584585
List<String> index = entryLines(jarFile, this.indexPath + "layers.idx");
585586
assertThat(getLayerNames(index)).containsExactly("my-deps", "my-internal-deps", "my-snapshot-deps",
586587
"resources", "application");
587-
String layerToolsJar = this.libPath + JarModeLibrary.LAYER_TOOLS.getName();
588+
String layerToolsJar = this.libPath + JarModeLibrary.TOOLS.getName();
588589
List<String> expected = new ArrayList<>();
589590
expected.add("- \"my-deps\":");
590591
expected.add(" - \"" + layerToolsJar + "\"");
@@ -614,15 +615,32 @@ void whenJarIsLayeredWithCustomStrategiesThenLayersIndexIsPresentAndCorrect() th
614615
@Test
615616
void whenArchiveIsLayeredThenLayerToolsAreAddedToTheJar() throws IOException {
616617
List<String> entryNames = getEntryNames(createLayeredJar());
617-
assertThat(entryNames).contains(this.libPath + JarModeLibrary.LAYER_TOOLS.getName());
618+
assertThat(entryNames).contains(this.libPath + JarModeLibrary.TOOLS.getName());
618619
}
619620

620621
@Test
622+
void shouldAddToolsToTheJar() throws IOException {
623+
this.task.getMainClass().set("com.example.Main");
624+
executeTask();
625+
List<String> entryNames = getEntryNames(this.task.getArchiveFile().get().getAsFile());
626+
assertThat(entryNames).isNotEmpty().contains(this.libPath + JarModeLibrary.TOOLS.getName());
627+
}
628+
629+
@Test
630+
@SuppressWarnings("removal")
621631
void whenArchiveIsLayeredAndIncludeLayerToolsIsFalseThenLayerToolsAreNotAddedToTheJar() throws IOException {
622632
List<String> entryNames = getEntryNames(
623633
createLayeredJar((configuration) -> configuration.getIncludeLayerTools().set(false)));
624-
assertThat(entryNames).isNotEmpty()
625-
.doesNotContain(this.indexPath + "layers/dependencies/lib/spring-boot-jarmode-layertools.jar");
634+
assertThat(entryNames).isNotEmpty().doesNotContain(this.libPath + JarModeLibrary.TOOLS.getName());
635+
}
636+
637+
@Test
638+
void whenIncludeToolsIsFalseThenToolsAreNotAddedToTheJar() throws IOException {
639+
this.task.getIncludeTools().set(false);
640+
this.task.getMainClass().set("com.example.Main");
641+
executeTask();
642+
List<String> entryNames = getEntryNames(this.task.getArchiveFile().get().getAsFile());
643+
assertThat(entryNames).isNotEmpty().doesNotContain(this.libPath + JarModeLibrary.TOOLS.getName());
626644
}
627645

628646
protected File jarFile(String name) throws IOException {

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/BootJarIntegrationTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -67,7 +67,7 @@ void packagedApplicationClasspath() throws IOException {
6767
assertThat(output).containsPattern("1\\. .*classes");
6868
assertThat(output).containsPattern("2\\. .*library-1.0-SNAPSHOT.jar");
6969
assertThat(output).containsPattern("3\\. .*commons-lang3-3.9.jar");
70-
assertThat(output).containsPattern("4\\. .*spring-boot-jarmode-layertools.*.jar");
70+
assertThat(output).containsPattern("4\\. .*spring-boot-jarmode-tools.*.jar");
7171
assertThat(output).doesNotContain("5. ");
7272
}
7373

@@ -77,7 +77,7 @@ void explodedApplicationClasspath() throws IOException {
7777
BuildResult result = this.gradleBuild.build("launch");
7878
String output = result.getOutput();
7979
assertThat(output).containsPattern("1\\. .*classes");
80-
assertThat(output).containsPattern("2\\. .*spring-boot-jarmode-layertools.*.jar");
80+
assertThat(output).containsPattern("2\\. .*spring-boot-jarmode-tools.*.jar");
8181
assertThat(output).containsPattern("3\\. .*library-1.0-SNAPSHOT.jar");
8282
assertThat(output).containsPattern("4\\. .*commons-lang3-3.9.jar");
8383
assertThat(output).doesNotContain("5. ");

0 commit comments

Comments
 (0)