BrynCooke/cdi-unit — pull request #44 by sfleiter (2013-11-24 21:54:20+00:00)
Title: Deactivate support for special scopes when used version of weld is not compatibel with cdi-unit instead of breaking test

When the version of weld used in a project does not match that of cdi-unit a cdi-unit based test will break if servlet-api is available in the classpath.

For an example see https://github.com/sfleiter/sandbox/tree/master/cdi-unit-problem.
You can choose the weld version there in the pom properties and experiment yourself.

Using another version of weld is explicitly supported by cdi-unit documentation:
http://jglue.org/cdi-unit-user-guide/#weldVersions

With this modification the problem is detected and only support for special scopes is deactivated.
A warning log message informs the developer and should give hint what to do when these scopes are needed.