From 53839bf5cd1c4cd196e5c50c75c6642346269c39 Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Sat, 25 Mar 2023 16:11:15 +0100 Subject: [PATCH 1/2] Adjust eclipse.importorder to be consistent with our formatter config --- .../ide-config/src/main/resources/eclipse.importorder | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/independent-projects/ide-config/src/main/resources/eclipse.importorder b/independent-projects/ide-config/src/main/resources/eclipse.importorder index 058fb14e630c4..e4322298cbd83 100644 --- a/independent-projects/ide-config/src/main/resources/eclipse.importorder +++ b/independent-projects/ide-config/src/main/resources/eclipse.importorder @@ -2,5 +2,6 @@ #Wed Jan 23 12:03:29 AEDT 2019 0=java 1=javax -2=org -3=com +2=jakarta +3=org +4=com From b8f5fcef212dc3900e91ed75287cd9ae19ec282a Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Sat, 25 Mar 2023 19:09:08 +0100 Subject: [PATCH 2/2] Provide proper Docker executable name on Windows --- core/runtime/pom.xml | 4 ++++ .../runtime/util/ContainerRuntimeUtil.java | 15 +++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/core/runtime/pom.xml b/core/runtime/pom.xml index 13784259da37d..af8e5e9585149 100644 --- a/core/runtime/pom.xml +++ b/core/runtime/pom.xml @@ -27,6 +27,10 @@ jakarta.inject jakarta.inject-api + + io.smallrye.common + smallrye-common-os + io.quarkus quarkus-ide-launcher diff --git a/core/runtime/src/main/java/io/quarkus/runtime/util/ContainerRuntimeUtil.java b/core/runtime/src/main/java/io/quarkus/runtime/util/ContainerRuntimeUtil.java index 2be3cbf76bdaa..33e2e6ef7a70a 100644 --- a/core/runtime/src/main/java/io/quarkus/runtime/util/ContainerRuntimeUtil.java +++ b/core/runtime/src/main/java/io/quarkus/runtime/util/ContainerRuntimeUtil.java @@ -12,6 +12,7 @@ import org.eclipse.microprofile.config.ConfigProvider; import org.jboss.logging.Logger; +import io.smallrye.common.os.OS; import io.smallrye.config.SmallRyeConfig; public final class ContainerRuntimeUtil { @@ -192,18 +193,24 @@ private static boolean getRootlessStateFor(ContainerRuntime containerRuntime) { * Supported Container runtimes */ public enum ContainerRuntime { - DOCKER, - PODMAN, - UNAVAILABLE; + DOCKER("docker" + (OS.current() == OS.WINDOWS ? ".exe" : "")), + PODMAN("podman" + (OS.current() == OS.WINDOWS ? ".exe" : "")), + UNAVAILABLE(null); private Boolean rootless; + private String executableName; + + ContainerRuntime(String executableName) { + this.executableName = executableName; + } + public String getExecutableName() { if (this == UNAVAILABLE) { throw new IllegalStateException("Cannot get an executable name when no container runtime is available"); } - return this.name().toLowerCase(); + return executableName; } public boolean isRootless() {