diff --git a/extensions/container-image/deployment/src/main/java/io/quarkus/container/image/deployment/ContainerImageConfig.java b/extensions/container-image/deployment/src/main/java/io/quarkus/container/image/deployment/ContainerImageConfig.java index 986326cfe50c7..df6d5f6de9794 100644 --- a/extensions/container-image/deployment/src/main/java/io/quarkus/container/image/deployment/ContainerImageConfig.java +++ b/extensions/container-image/deployment/src/main/java/io/quarkus/container/image/deployment/ContainerImageConfig.java @@ -110,6 +110,8 @@ public Optional getEffectiveGroup() { return Optional.empty(); } return Optional.of(originalGroup.toLowerCase().replace(' ', '-')); + } else if (originalGroup.isEmpty()) { + return Optional.empty(); } } return group; diff --git a/integration-tests/container-image/maven-invoker-way/src/it/container-build-jib/src/main/resources/application.properties b/integration-tests/container-image/maven-invoker-way/src/it/container-build-jib/src/main/resources/application.properties index 3c1ac56a1ad0a..8a62001cee00c 100644 --- a/integration-tests/container-image/maven-invoker-way/src/it/container-build-jib/src/main/resources/application.properties +++ b/integration-tests/container-image/maven-invoker-way/src/it/container-build-jib/src/main/resources/application.properties @@ -1,2 +1,3 @@ # Configuration file -# key = value \ No newline at end of file +# key = value +quarkus.container-image.group= diff --git a/integration-tests/container-image/maven-invoker-way/src/it/container-build-jib/verify.groovy b/integration-tests/container-image/maven-invoker-way/src/it/container-build-jib/verify.groovy index f80a537dcdf76..5e11627791e4e 100644 --- a/integration-tests/container-image/maven-invoker-way/src/it/container-build-jib/verify.groovy +++ b/integration-tests/container-image/maven-invoker-way/src/it/container-build-jib/verify.groovy @@ -11,9 +11,8 @@ try { return } -String group = System.getProperty("user.name") -assert ExecUtil.exec("docker", "images", group + "/container-build-jib") -assert ExecUtil.exec("docker", "rmi", group + "/container-build-jib:0.1-SNAPSHOT") +assert ExecUtil.exec("docker", "images", "container-build-jib") +assert ExecUtil.exec("docker", "rmi", "container-build-jib:0.1-SNAPSHOT") Path pathInIT = Paths.get("target", "it", "container-build-jib", "target") @@ -36,7 +35,7 @@ propertiesFile.withInputStream { } assert properties.type == 'jar-container' -assert properties."metadata.container-image" == group + "/container-build-jib:0.1-SNAPSHOT" +assert properties."metadata.container-image" == "container-build-jib:0.1-SNAPSHOT" assert Files.exists(target.resolve("jib-image.digest"))