--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/83c6f3d9-e6d6-4301-9e14-7e15754577f6n%40googlegroups.com.
Excellent I think I can just find a way to map all those Eager
beans to the Quarkus Startup type!
You are my hero that did the trick!
@BuildStep AnnotationsTransformerBuildItem transformBeanScope(BeanArchiveIndexBuildItem index, CustomScopeAnnotationsBuildItem scopes) { return new AnnotationsTransformerBuildItem(new AnnotationsTransformer() { @Override public boolean appliesTo(AnnotationTarget.Kind kind) { return kind == org.jboss.jandex.AnnotationTarget.Kind.CLASS; } @Override public void transform(AnnotationsTransformer.TransformationContext ctx) { if (ctx.isClass()) { ClassInfo clazz = ctx.getTarget().asClass(); Map<DotName, List<AnnotationInstance>> annotations = clazz.annotationsMap(); if (annotations.containsKey(OMNIFACES_STARTUP)) { LOGGER.infof("OmniFaces found @%s annotations on a class %s - adding @ApplicationScoped", OMNIFACES_STARTUP, ctx.getTarget()); ctx.transform().add(ApplicationScoped.class).done(); } if (annotations.containsKey(OMNIFACES_EAGER) || annotations.containsKey(OMNIFACES_STARTUP)) { LOGGER.infof("OmniFaces found @Eager annotations on a class %s - adding @io.quarkus.runtime.Startup", ctx.getTarget()); ctx.transform().add(io.quarkus.runtime.Startup.class).done(); } } } }); }
This may help too: https://github.com/quarkusio/quarkus/blob/main/extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/AnnotationsTransformerBuildItem.java 😉