diff --git a/src/main/java/rife/bld/extension/BootWarOperation.java b/src/main/java/rife/bld/extension/BootWarOperation.java index 9149497..41cd004 100644 --- a/src/main/java/rife/bld/extension/BootWarOperation.java +++ b/src/main/java/rife/bld/extension/BootWarOperation.java @@ -54,7 +54,7 @@ public class BootWarOperation extends AbstractBootOperation { executeCopyWebInfProvidedLib(web_inf_dir); executeCopyBootLoader(staging_dir); - executeCreateArchive(staging_dir, LOGGER); + executeCreateArchive(staging_dir); if (!silent() && LOGGER.isLoggable(Level.INFO)) { LOGGER.info(String.format("The executable WAR (%s) was created in: %s%n", destinationFileName(), @@ -66,16 +66,15 @@ public class BootWarOperation extends AbstractBootOperation { } /** - * Part of the {@link #execute} operation, copy the {@code BOOT-INF} libs. + * Part of the {@link #execute} operation, copy the {@code WEB-INF/lib-provided} libs. * - * @param stagingBootInfDirectory the staging {@code BOOT-INF} directory + * @param stagingWebInfDirectory the staging {@code WEB-INF/lib-provided} directory */ - protected void executeCopyWebInfProvidedLib(File stagingBootInfDirectory) throws IOException { - var boot_inf_lib_dir = new File(stagingBootInfDirectory, "lib"); - mkDirs(boot_inf_lib_dir); + protected void executeCopyWebInfProvidedLib(File stagingWebInfDirectory) throws IOException { + var lib_provided_dir = new File(stagingWebInfDirectory, "lib-provided"); + mkDirs(lib_provided_dir); for (var jar : providedLibs_) { - Files.copy(jar.toPath(), boot_inf_lib_dir.toPath().resolve(jar.getName())); if (jar.exists()) { Files.copy(jar.toPath(), lib_provided_dir.toPath().resolve(jar.getName())); } else if (LOGGER.isLoggable(Level.WARNING)) { diff --git a/src/test/java/rife/bld/extension/BootJarOperationTest.java b/src/test/java/rife/bld/extension/BootJarOperationTest.java index 7236214..956a354 100644 --- a/src/test/java/rife/bld/extension/BootJarOperationTest.java +++ b/src/test/java/rife/bld/extension/BootJarOperationTest.java @@ -283,7 +283,8 @@ class BootJarOperationTest { "WEB-INF/lib/" + BLD + '\n' + "WEB-INF/lib/dist/\n" + "WEB-INF/lib/" + SPRING_BOOT + '\n' + - "WEB-INF/lib/" + SPRING_BOOT_ACTUATOR + '\n' + LAUNCHER_JARS); + "WEB-INF/lib/" + SPRING_BOOT_ACTUATOR + '\n' + + "WEB-INF/lib-provided/\n" + LAUNCHER_JARS); FileUtils.deleteDirectory(tmp_dir); }