From a40c1c2c3f017b01130e0ab9833da6b8662d14fa Mon Sep 17 00:00:00 2001 From: Georgios Andrianakis Date: Mon, 22 Apr 2024 11:35:58 +0300 Subject: [PATCH] Turn beans from info extension into ApplicationScoped This is done purely to aid testing Closes: #40152 --- .../java/io/quarkus/info/deployment/InfoProcessor.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/extensions/info/deployment/src/main/java/io/quarkus/info/deployment/InfoProcessor.java b/extensions/info/deployment/src/main/java/io/quarkus/info/deployment/InfoProcessor.java index c8882b07d9f1d..9e62736b27be6 100644 --- a/extensions/info/deployment/src/main/java/io/quarkus/info/deployment/InfoProcessor.java +++ b/extensions/info/deployment/src/main/java/io/quarkus/info/deployment/InfoProcessor.java @@ -13,7 +13,7 @@ import java.util.TimeZone; import java.util.stream.Collectors; -import jakarta.inject.Singleton; +import jakarta.enterprise.context.ApplicationScoped; import org.eclipse.jgit.api.Git; import org.eclipse.jgit.api.errors.GitAPIException; @@ -122,7 +122,7 @@ void gitInfo(InfoBuildTimeConfig config, valuesProducer.produce(new InfoBuildTimeValuesBuildItem("git", data)); beanProducer.produce(SyntheticBeanBuildItem.configure(GitInfo.class) .supplier(recorder.gitInfoSupplier(branch, latestCommitId, latestCommitTime)) - .scope(Singleton.class) + .scope(ApplicationScoped.class) .setRuntimeInit() .done()); } catch (Exception e) { @@ -229,7 +229,7 @@ void buildInfo(CurateOutcomeBuildItem curateOutcomeBuildItem, valuesProducer.produce(new InfoBuildTimeValuesBuildItem("build", data)); beanProducer.produce(SyntheticBeanBuildItem.configure(BuildInfo.class) .supplier(recorder.buildInfoSupplier(group, artifact, version, time, quarkusVersion)) - .scope(Singleton.class) + .scope(ApplicationScoped.class) .setRuntimeInit() .done()); } @@ -251,7 +251,7 @@ void osInfo(InfoRecorder recorder, valuesProducer.produce(new InfoBuildTimeContributorBuildItem(recorder.osInfoContributor())); beanProducer.produce(SyntheticBeanBuildItem.configure(OsInfo.class) .supplier(recorder.osInfoSupplier()) - .scope(Singleton.class) + .scope(ApplicationScoped.class) .setRuntimeInit() .done()); } @@ -264,7 +264,7 @@ void javaInfo(InfoRecorder recorder, valuesProducer.produce(new InfoBuildTimeContributorBuildItem(recorder.javaInfoContributor())); beanProducer.produce(SyntheticBeanBuildItem.configure(JavaInfo.class) .supplier(recorder.javaInfoSupplier()) - .scope(Singleton.class) + .scope(ApplicationScoped.class) .setRuntimeInit() .done()); }