|
Hi Thibault Kruse First note there is no implicit bean archive support for SE in Weld 2.3.x (see https://issues.jboss.org/browse/WELD-2129) yet. So this is the issue of cdi-unit. This tool adds beans.xml file for the test deployment. This is the reason why it works. The problem/difference starts here https://github.com/BrynCooke/cdi-unit/blob/master/cdi-unit/src/main/java/org/jglue/cdiunit/internal/WeldTestUrlDeployment.java#L412. In case of surefire the location is found in cdiClasspathEntries hence the HelloBean is marked as CDI class and it's available afterwards. In case of failsafe the jar is not available in cdiClasspathEntries (I guess simply because org.jglue.cdiunit.internal.WeldTestUrlDeployment#populateCdiClasspathSet doesn't handle this but I didn't investigate it in details) hence the class is not marked as CDI class.
|