From 6ff99dec50a96e899aaae56e8b24aff937a71f63 Mon Sep 17 00:00:00 2001 From: Georgios Andrianakis Date: Mon, 1 Jun 2020 14:08:22 +0300 Subject: [PATCH] Apply minor cleanup to JibProcessor when building fast-jar --- .../image/jib/deployment/JibProcessor.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/extensions/container-image/container-image-jib/deployment/src/main/java/io/quarkus/container/image/jib/deployment/JibProcessor.java b/extensions/container-image/container-image-jib/deployment/src/main/java/io/quarkus/container/image/jib/deployment/JibProcessor.java index 3119898e2e809..92a323ed2a65f 100644 --- a/extensions/container-image/container-image-jib/deployment/src/main/java/io/quarkus/container/image/jib/deployment/JibProcessor.java +++ b/extensions/container-image/container-image-jib/deployment/src/main/java/io/quarkus/container/image/jib/deployment/JibProcessor.java @@ -51,6 +51,7 @@ import io.quarkus.deployment.pkg.builditem.JarBuildItem; import io.quarkus.deployment.pkg.builditem.NativeImageBuildItem; import io.quarkus.deployment.pkg.builditem.OutputTargetBuildItem; +import io.quarkus.deployment.pkg.steps.JarResultBuildStep; import io.quarkus.deployment.pkg.steps.NativeBuild; public class JibProcessor { @@ -260,11 +261,13 @@ private JibContainerBuilder createContainerBuilderFromFastJar(JibConfig jibConfi try { return Jib.from(toRegistryImage(ImageReference.parse(jibConfig.baseJvmImage), jibConfig.baseRegistryUsername, jibConfig.baseRegistryPassword)) - .addLayer(Collections.singletonList(componentsPath.resolve("lib")), workDirInContainer) - .addLayer(Collections.singletonList(componentsPath.resolve("boot-lib")), workDirInContainer) - .addLayer(Collections.singletonList(componentsPath.resolve("quarkus-run.jar")), workDirInContainer) - .addLayer(Collections.singletonList(componentsPath.resolve("quarkus")), workDirInContainer) - .addLayer(Collections.singletonList(componentsPath.resolve("app")), workDirInContainer) + .addLayer(Collections.singletonList(componentsPath.resolve(JarResultBuildStep.LIB)), workDirInContainer) + .addLayer(Collections.singletonList(componentsPath.resolve(JarResultBuildStep.BOOT_LIB)), + workDirInContainer) + .addLayer(Collections.singletonList(componentsPath.resolve(JarResultBuildStep.QUARKUS_RUN_JAR)), + workDirInContainer) + .addLayer(Collections.singletonList(componentsPath.resolve(JarResultBuildStep.QUARKUS)), workDirInContainer) + .addLayer(Collections.singletonList(componentsPath.resolve(JarResultBuildStep.APP)), workDirInContainer) .setWorkingDirectory(workDirInContainer) .setEntrypoint(entrypoint) .setEnvironment(jibConfig.environmentVariables)