This is a problem of ShrinkwrapClassLoader not filtering system classpath properly.
I remember a JIRA issue about it, but cannot find it atm.
This is pretty basic functionality , Is there a way to work around it rather then deleting the main beans.xml every time I run tests ?
1 of 1 people found this helpful
Is there a way to work around it rather then deleting the main beans.xml every time I run tests ?
Perhaps rename both, so they have non-CDI specific names as originals,
only to have proper CDI names once in Shrinkwrap archive.
Or try some managed container instead to have full control what's deployed.
Even after renaming both files Weld stil manages to find some bean.xml , it sees classes from the current jar but not my correct beans.xml, I am going to add some logging to weld core to see whats going on.
regarding managed container , I only need CDI support , is there a really light weight managed container for that?
I have upgraded weld to version 2.0.0 beta 3 and the issue seems to be resolved , although looking at the fixes list i don't see anything that could explein this