Sorry to have bothered, I had to add it like this in my code:
ModuleDependency dep = new ModuleDependency(moduleLoader, moduleId, false, false, true);
dep.addExportFilter(PathFilters.getMetaInfSubdirectoriesFilter(), true);
It works now!
----- Original Message -----
From: "Magesh Kumar Bojan" <mbojan(a)redhat.com>
To: "jboss-as7-dev" <jboss-as7-dev(a)lists.jboss.org>
Sent: Wednesday, May 11, 2011 5:18:50 PM GMT +05:30 Chennai, Kolkata, Mumbai, New Delhi
Subject: [jboss-as7-dev] How to resolve resources from modules dependecies?
Hi,
I am integrating Apache Camel for SwitchYard in AS7. We have defined a new Camel component
in Switchyard and, per their requirement, the component class name is embedded inside a
file in a dependent Switchyard module jar:
META-INF/services/org/apache/camel/component/switchyard
This at runtime is read via TCCL.getResourceAsStream by Camel. Now tracing through the
Module implementation, I noticed that from a given dependent module only the META-INF,
META-INF/services are added in the paths list. However, the path
META-INF/services/org/apache/camel/component is not found. I tried adding
export="true" with export for that path
"META-INF/services/org/apache/camel/component" in that dependency but in vain.
How to ensure any or all resource paths included in a dependent module is added to a given
module's path list?
cheers,
Magesh
_______________________________________________
jboss-as7-dev mailing list
jboss-as7-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev