From 9f747b850f4b52a9260b4491028144fef600c880 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Vav=C5=99=C3=ADk?= Date: Thu, 3 Aug 2023 23:49:54 +0200 Subject: [PATCH] Fix Quarkus Platform group id for external applications --- ...alhostQuarkusApplicationManagedResource.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/quarkus-test-core/src/main/java/io/quarkus/test/services/quarkus/GitRepositoryLocalhostQuarkusApplicationManagedResource.java b/quarkus-test-core/src/main/java/io/quarkus/test/services/quarkus/GitRepositoryLocalhostQuarkusApplicationManagedResource.java index 05bbc32fc..7a8234c4f 100644 --- a/quarkus-test-core/src/main/java/io/quarkus/test/services/quarkus/GitRepositoryLocalhostQuarkusApplicationManagedResource.java +++ b/quarkus-test-core/src/main/java/io/quarkus/test/services/quarkus/GitRepositoryLocalhostQuarkusApplicationManagedResource.java @@ -2,6 +2,8 @@ import static io.quarkus.test.services.quarkus.GitRepositoryResourceBuilderUtils.cloneRepository; import static io.quarkus.test.services.quarkus.GitRepositoryResourceBuilderUtils.mavenBuild; +import static io.quarkus.test.services.quarkus.model.QuarkusProperties.PLATFORM_GROUP_ID; +import static io.quarkus.test.utils.MavenUtils.withProperty; import java.nio.file.Path; import java.util.List; @@ -43,13 +45,20 @@ protected Path getApplicationFolder() { @Override protected List prepareCommand(List systemProperties) { - // Dev mode + final List commands; + if (model.isDevMode()) { - return MavenUtils.devModeMavenCommand(model.getContext(), systemProperties); + // Dev mode + commands = MavenUtils.devModeMavenCommand(model.getContext(), systemProperties); + } else { + // JVM or Native + commands = super.prepareCommand(systemProperties); } - // JVM or Native - return super.prepareCommand(systemProperties); + // set quarkus.platform.group-id + commands.add(withProperty(PLATFORM_GROUP_ID.getPropertyKey(), PLATFORM_GROUP_ID.get())); + + return List.copyOf(commands); } @Override