how did you prepare module?
does it contain jandex index?
The module is a simple JAR copied in the %JBOSS_EAP%/modules/system/layers/base/my/test/main folder with a module.xml file.
What is a jandex index ?
If you mean the .jar.index file, yes, the file is in the module folder.
I have attached a sample.
test.zip 7.0 K
1 of 1 people found this helpful
Two suggestions regarding module placement:
1) Don't put it in modules/system/layers/base, as that is for modules that ship with EAP. End user-provided modules can remain simply under modules/.
2) The string format for the id of a module is dot.separated.name[:slot]. The :slot part is optional in the string form, with a default 'slot' of "main" assumed if not provided. However, the filesystem path to the root of the module requires the full name and slot. So, the path to the root of your module would be %JBOSS_EAP%/modules/my/test/main.
Note that putting it under modules/system/layers/base wouldn't prevent it working; it's just not the intended way to do it. The key part is including "main" in the filesystem path.
I forgot to copy/paste the main folder for the module.
In fact, it exists (I have updated my message).
I have tested with the module directly deployed in modules (%JBOSS_EAP%/modules/my/test/main) but same result
I'm not an expert in this particular feature, but your module packaging sounds fine. You describe adding Dependencies to MANIFEST.MF as well.
Here's a link to a test case that was added as part of the commit for AS7-4567. Perhaps you'll notice a difference between what's done there and what you're doing. The deploy2() method is what creates the test deployment. It builds a jar (using shrinkwrap but that's irrelevant) that packages up the deployment's classes, beans.xml and a MANIFEST.MF with contents "Dependencies: org.jboss.test.weldModule meta-inf".
Brian, you're the best
I didn't noticed the meta-inf information in the Dependencies attribute when looking for a solution.
That's the key.
I have added it, and it works fine.
To sum up, here is the configuration:
- Create a module with CDI producer
- Add META-INF/beans.xml file in it
- Deploy it in %JBOSS_EAP%/modules/my/module/main with the module.xml file
- Add Dependencies: my.module meta-inf in MANIFEST.MF
- Deploy in JBoss EAP
Thanks a lot for your help.