p.s. If you want to try to create a patch, then look in
LocalRepositoryImpl, which is where local bundles get converted to
resources. This is where we need to add the bundle capability.
-> richard
On 9/21/09 19:27, Richard S. Hall wrote:
Ok, I see what you are saying. The local resources do not get a
"bundle" capability created for them, so they cannot be matched
against when resolving a bundle.
Yes, that was probably an oversight. Just attach this info to the JIRA
issue and I will look into integrating it.
-> richard
On 9/21/09 17:23, Jochen Mader wrote:
The solution is pretty straight forward.
I modified "private List searchLocalResources(Requirement req)" in
ResolverImpl to include the following:
if (!m_failedSet.contains(resources[resIdx])
&& !m_resolveSet.contains(resources[resIdx])) {
//begin fix
Capability[] caps = resources[resIdx].getCapabilities();
CapabilityImpl impl = new CapabilityImpl();
Map map = resources[resIdx].getProperties();
for (Entry entry : (Set<Entry>) map.entrySet()) {
impl.addP(entry.getKey().toString(), entry.getValue());
}
if (req.isSatisfied(impl)) {
matchingCandidates.add(resources[resIdx]);
continue;
}
//end fix
I create a temporary capability that contains all the properties of a
resource (the properties contain the bundle name and version). This
can then
be passed to requirement's isSatisifed method and matched against the
filter.
I am looking for a better place to put this but my scenario works now.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]