I am using Weld servlet together with Jetty embedded and Arquillian.
My application has 3 classes ClassA, CLassB, and CLassC.
Although I am only adding ClassA to the shrinkwrap container, weld reports all 3 classes as managed beans.
After some testing I have figured out that for some reason weld sees the beans.xml file that resides in src/main/resources/META-INF/beans.xml and is not on the test classpath. After deleting this file weld no longer reports adding CLassB and CLassC as managed beans.
I am pretty sure that this is a bug, should I add it in Jira?
I would guess that embedded Jetty does not isolate the test classpath properly from the rest of resources. Can you reproduce the problem in a non-embedded container? If not it is probably a Jetty/Arquillian issue.