So I just tried locally with Weld 3.0 CR2
And it correctly throws
Even when I explicitly add the extension, same thing occurs (.addExtensions(BeanDiscoverer.class)). Even when I explicitly add to META-INF/services/Extension it fails.
This is what my beans.xml looks like:
Only when I change to all does it run fine... You can see the full example at https://github.com/johnament/cdi-2.0-presentations/blob/master/cdi2conference/src/main/java/ws/ament/cdi/se/extensions/BeanDiscoverer.java so
I'm curious to know if there's anything different between our setups.
John
Since you're mentioning a fledgling project and CDI 2.0, are you using SE mode of CDI, or is this within a container (and I'm guessing some custom integration)? If you're using SE, what does your SEContainerInitializer lines look like?
John
From: cdi-dev-bounces@lists.jboss.org <cdi-dev-bounces@lists.jboss.org> on behalf of Laird Nelson <ljnelson@gmail.com>
Sent: Monday, March 20, 2017 11:12 AM
To: Martin Kouba; cdi-dev
Subject: Re: [cdi-dev] Bean discovery questionOn Mon, Mar 20, 2017 at 12:26 AM Martin Kouba <mkouba@redhat.com> wrote:
Weld version? Environment? Deployment structure?
3.0.0-CR2 (CDI 2.0-PFD).Fledgling project containing only the extension at the moment, so no beans.I think the Producers class should not be discovered. So it looks like a
bug or misconfiguration.
Thank you; I'll file a bug once I have time to put together a test case.
Best,Laird
NOTICE: This e-mail message and any attachments may contain confidential, proprietary, and/or privileged information which should be treated accordingly. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this message, and destroy all physical and electronic copies. Thank you.