[ 
https://issues.apache.org/jira/browse/DELTASPIKE-1421?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Andraschko closed DELTASPIKE-1421.
-----------------------------------------
    Resolution: Incomplete

> 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
>            Priority: Major
>
> 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 can see these classes are still scanned, 
> thus I receive ambiguos dependency because of my mock classes on _test_ 
> folder.
> Is there any way to exclude above classes with success or, even better, to 
> explicitly add bean classes?
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to