Declare an InjectionPointInfo manually #38317
-
I have an extension that produce a synthetic bean only when an Unfortunately, the first bean is not produced because the synthetic injection point is not discovered. Would it be possible to declare this InjectionPoint in a previous build step so the first bean can be produced with the same logic ? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I split the discovery and the requirement with an intermediate build item that other extensions can contribute to. Still, if there is a shorter way of doing it, i'm still interested. |
Beta Was this translation helpful? Give feedback.
-
Unfortunately, you cannot define a synthetic injection point beforehand. Furthermore, the set of injection points accessible through the
I'm not quite sure I understand this solution. Do I understand it correctly that the first extension produces a specific build item which signals that a synthetic bean was produced? In other words, a specific build item replaced the injection point check in another extension. If so then it's ok and I'm not aware of a better way. |
Beta Was this translation helpful? Give feedback.
Unfortunately, you cannot define a synthetic injection point beforehand. Furthermore, the set of injection points accessible through the
BeanDiscoveryFinishedBuildItem#getInjectionPoints()
orSynthesisFinishedBuildItem#getInjectionPoints()
is updated with synthetic injection points after all synthetic beans are registered.I'm not quite sure I understand this solution. Do I understand it correctly that the first extension produces a specific…