Skip to content

Commit

Permalink
Fix #735 to the raw property name in the artemis url generated by dev…
Browse files Browse the repository at this point in the history
…service
  • Loading branch information
zhfeng committed Feb 20, 2025
1 parent 8615554 commit 4de5f9e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
5 changes: 5 additions & 0 deletions core/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@
<artifactId>quarkus-smallrye-health-spi</artifactId>
</dependency>

<dependency>
<groupId>org.eclipse.microprofile.config</groupId>
<artifactId>microprofile-config-api</artifactId>
</dependency>

<dependency>
<groupId>io.quarkiverse.artemis</groupId>
<artifactId>quarkus-artemis-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Supplier;

import org.eclipse.microprofile.config.ConfigProvider;
import org.jboss.logging.Logger;
import org.testcontainers.containers.GenericContainer;
import org.testcontainers.containers.Network;
Expand Down Expand Up @@ -42,7 +43,7 @@
public class DevServicesArtemisProcessor {
private static final Logger LOGGER = Logger.getLogger(DevServicesArtemisProcessor.class);
private static final String QUARKUS_ARTEMIS_URL = "quarkus.artemis.url";
private static final String QUARKUS_ARTEMIS_NAMED_URL_TEMPLATE = "quarkus.artemis.\"%s\".url";
private static final String QUARKUS_ARTEMIS_NAMED_URL_TEMPLATE = "quarkus.artemis.%s.url";

/**
* Label to add to shared Dev Service for ActiveMQ Artemis running in containers.
Expand Down Expand Up @@ -72,6 +73,14 @@ public List<DevServicesResultBuildItem> startArtemisDevService(
DevServicesConfig devServicesConfig) {
ArrayList<DevServicesResultBuildItem> results = new ArrayList<>();
for (String name : bootstrap.getConfigurationNames()) {
String properName = name;
for (String rawName : ConfigProvider.getConfig().getPropertyNames()) {
if (rawName.contains(name)) {
String s = rawName.substring("quarkus.artemis.".length());
properName = s.substring(0, s.indexOf('.'));
break;
}
}
ArtemisBuildTimeConfig buildTimeConfig = buildConfigs.configs().get(name);
boolean isUrlEmpty = shadowRunTimeConfigs.isUrlEmpty(name);
if (!shadowRunTimeConfigs.getNames().contains(name) && buildTimeConfig.isEmpty()) {
Expand All @@ -86,7 +95,7 @@ public List<DevServicesResultBuildItem> startArtemisDevService(
isUrlEmpty);
DevServicesResultBuildItem result = start(
configuration,
name,
properName,
dockerStatusBuildItem,
launchMode,
consoleInstalledBuildItem,
Expand Down

0 comments on commit 4de5f9e

Please sign in to comment.