[cdi-dev] beans exclude

Mark Struberg struberg at yahoo.de
Fri Apr 26 03:04:44 EDT 2013

Another one:

With the auto-pickup of all beans we have problems to provide libs for CDI-1.0 and 1.1.
In cdi-1.1 you can define a beans.xml with scan-mode none, but that beans.xml would trigger exactly the opposite in CDI-1.0 containers!

Thus I like to introduce a paragraph:

"If there is a file META-INF/nobeans.xml in absence of a beans.xml, the scan mode for this BDA is none"

Effectively means: if you don't like to get this jar picked up by neither cdi-1.1 nor 1.0 containers you don't write a beans.xml with scan-mode none but have no beans.xml at all but an empty nobeans.xml marker  file.

Not sure if it's too late to go into the spec, but it would help if OWB and Weld use this mechanism at least. And we add it to the spec in a MR.

Another topic:
ProcessAnnotatedType has no info about the id you can add with addAnnotatedType(Class, String). Nor has AnnotatedType. That might be an issue for some use cases, isn't? I'd at least supposed to get it in ProcessSyntheticAnnotatedType.


More information about the cdi-dev mailing list