-
1. Re: CDI bean discovery across Modules on 7.2
texanhogman Oct 21, 2013 3:02 PM (in response to texanhogman)After debugging through the JBoss modules source, I have identified the solution. By default, a module dependency does not import or export the META-INF directory; this is true with or without the export="true" attribute. Without META-INF, of course CDI scanning will not occur. After a debug session, I realized I could explicitly export the META-INF; it take did me a while to also realize I need to import it as well.
The updated module.xml for my Foo module now looks like this
<module xmlns="urn:jboss:module:1.1" name="org.hogdev.play.foo" slot="1.1.0">
<resources>
<resource-root path="foo-1.1.0.jar" />
</resources>
<dependencies>
<module name="org.hogdev.play.bar" slot="1.1.0" export="true">
<imports>
<include-set>
<path name="META-INF"/>
</include-set>
</imports>
<exports>
<include-set>
<path name="META-INF"/>
</include-set>
</exports>
</module>
<module name="javax.annotation.api" />
<module name="javax.inject.api" />
</dependencies>
</module>