[jboss-as7-dev] How to resolve resources from modules dependecies?
Magesh Kumar Bojan
mbojan at redhat.com
Wed May 11 09:03:40 EDT 2011
Cool, Thanks David! :)
----- Original Message -----
From: "David M. Lloyd" <david.lloyd at redhat.com>
To: jboss-as7-dev at lists.jboss.org
Sent: Wednesday, May 11, 2011 6:29:29 PM GMT +05:30 Chennai, Kolkata, Mumbai, New Delhi
Subject: Re: [jboss-as7-dev] How to resolve resources from modules dependecies?
You may want to consider instead using a filter for the subdirectories
of "META-INF/services" so that you don't import the dependency
MANIFEST.MF or stuff like that.
dep.addExportFilter(PathFilters.isChildOf("META-INF/services"), true);
On 05/11/2011 07:56 AM, Magesh Kumar Bojan wrote:
> 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 at redhat.com>
> To: "jboss-as7-dev"<jboss-as7-dev at 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 at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
--
- DML
_______________________________________________
jboss-as7-dev mailing list
jboss-as7-dev at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
More information about the jboss-as7-dev
mailing list