users@glassfish.java.net

[FishCAT] CDI 1.1: How to exclude an archive from scanning?

From: Harald Wellmann <hwellmann.de_at_gmail.com>
Date: Sun, 05 May 2013 22:02:18 +0200

Does GlassFish 4.0 or Weld 2.0 offer an option to prevent an archive
from being scanned for managed beans?

CDI 1.1 section 12.1 only states:

"For compatibility with Contexts and Dependency 1.0, products must
contain an option to cause an archive to be ignored by the container
when no beans.xml is present."

I'm having problems with a web app containing guava-14.0.jar in
WEB-INF/lib which has a class annotated with javax.inject.Singleton, so
it gets treated as an implicit bean archive, which causes an exception.

Best regards,
Harald