I am running tests with CDI-unit runner and want some classes to be excluded (because they act on CDI events). I tried beans.xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee">
<scan>
<exclude name="com.mypackage.**"/>
</scan>
</beans>
but CDI-unit seems to be ignoring it. So what is the correct way to exclude the classes with CDI-unit?