diff --git a/core/deployment/src/main/java/io/quarkus/artemis/core/deployment/ArtemisCoreProcessor.java b/core/deployment/src/main/java/io/quarkus/artemis/core/deployment/ArtemisCoreProcessor.java index 26ad36e4..0b072238 100644 --- a/core/deployment/src/main/java/io/quarkus/artemis/core/deployment/ArtemisCoreProcessor.java +++ b/core/deployment/src/main/java/io/quarkus/artemis/core/deployment/ArtemisCoreProcessor.java @@ -55,8 +55,9 @@ public class ArtemisCoreProcessor { @SuppressWarnings("unused") @BuildStep - FeatureBuildItem feature(Optional artemisJms) { - if (artemisJms.isEmpty()) { + FeatureBuildItem feature(Optional artemisJms, + Optional ra) { + if (artemisJms.isEmpty() && ra.isEmpty()) { return new FeatureBuildItem(FEATURE); } return null; @@ -109,8 +110,9 @@ ArtemisCoreConfiguredBuildItem configure( ArtemisBuildTimeConfigs buildTimeConfigs, ArtemisBootstrappedBuildItem bootstrap, BuildProducer syntheticBeanProducer, - Optional artemisJms) { - if (artemisJms.isPresent()) { + Optional artemisJms, + Optional ra) { + if (artemisJms.isPresent() || ra.isPresent()) { return null; } if (shadowRunTimeConfigs.isEmpty() && buildTimeConfigs.isEmpty()) { diff --git a/core/deployment/src/main/java/io/quarkus/artemis/core/deployment/ArtemisJmsRABuildItem.java b/core/deployment/src/main/java/io/quarkus/artemis/core/deployment/ArtemisJmsRABuildItem.java new file mode 100644 index 00000000..a91cdb56 --- /dev/null +++ b/core/deployment/src/main/java/io/quarkus/artemis/core/deployment/ArtemisJmsRABuildItem.java @@ -0,0 +1,9 @@ +package io.quarkus.artemis.core.deployment; + +import io.quarkus.builder.item.SimpleBuildItem; + +/** + * Marker build item indicating that RA is enabled + */ +public class ArtemisJmsRABuildItem extends SimpleBuildItem { +} diff --git a/core/deployment/src/main/java/io/quarkus/artemis/core/deployment/health/ArtemisHealthProcessor.java b/core/deployment/src/main/java/io/quarkus/artemis/core/deployment/health/ArtemisHealthProcessor.java index 2509660c..90b0b1c7 100644 --- a/core/deployment/src/main/java/io/quarkus/artemis/core/deployment/health/ArtemisHealthProcessor.java +++ b/core/deployment/src/main/java/io/quarkus/artemis/core/deployment/health/ArtemisHealthProcessor.java @@ -6,6 +6,7 @@ import java.util.Optional; import java.util.Set; +import io.quarkus.artemis.core.deployment.ArtemisJmsRABuildItem; import jakarta.enterprise.context.ApplicationScoped; import io.quarkus.arc.deployment.SyntheticBeanBuildItem; @@ -77,8 +78,9 @@ private static Set processConfigs( HealthBuildItem healthChecks( Capabilities capabilities, Optional artemisJms, + Optional ra, Optional artemisHealthSupportBuildItem) { - if (artemisJms.isPresent()) { + if (artemisJms.isPresent() || ra.isPresent()) { return null; } if (artemisHealthSupportBuildItem.isEmpty()) { diff --git a/ra/deployment/src/main/java/io/quarkus/artemis/jms/ra/deployment/ArtemisResourceAdapterProcessor.java b/ra/deployment/src/main/java/io/quarkus/artemis/jms/ra/deployment/ArtemisResourceAdapterProcessor.java index 7aeae821..e83ffd8a 100644 --- a/ra/deployment/src/main/java/io/quarkus/artemis/jms/ra/deployment/ArtemisResourceAdapterProcessor.java +++ b/ra/deployment/src/main/java/io/quarkus/artemis/jms/ra/deployment/ArtemisResourceAdapterProcessor.java @@ -2,6 +2,7 @@ import java.util.Map.Entry; +import io.quarkus.artemis.core.deployment.ArtemisJmsRABuildItem; import jakarta.enterprise.context.ApplicationScoped; import jakarta.enterprise.inject.Default; @@ -29,6 +30,11 @@ FeatureBuildItem feature() { return new FeatureBuildItem(FEATURE); } + @BuildStep + void load(BuildProducer ra) { + ra.produce(new ArtemisJmsRABuildItem()); + } + @Record(ExecutionTime.RUNTIME_INIT) @BuildStep void setupServerLocatorForHealthCheck(ArtemisResourceAdapterRecorder recorder,