Fabrizio Stellato created DELTASPIKE-1421:
---------------------------------------------
Summary: Cannot exclude ApplicationScoped with @Produces method
Key: DELTASPIKE-1421
URL: https://issues.apache.org/jira/browse/DELTASPIKE-1421
Project: DeltaSpike
Issue Type: Bug
Security Level: public (Regular issues)
Components: CdiControl
Affects Versions: 1.9.4
Reporter: Fabrizio Stellato
I have *ApplicationScoped* beans on the _main_ java folder which work as
resources class, therefore they contains methods with _Produces_ annotation .
I'm currently using cucumber + deltaspike dependencies, and when I run my test
I can see ALL dependencies are implicit injected.
As I don't want to do that, I decided to exclude those ApplicationScoped
classes from _beans.xml_ in this way:
{code:java}
<weld:exclude pattern="^(.*)ServiceProducer$" />
<weld:exclude pattern="^(.*)LoggerProducer$" />
{code}
When I start my cucumber test, I still see these classes scanned, thus I
receive ambiguos dependency because of my mock classes on _test_ folder.
Is there any way to explicit add dependendat classes?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)