felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roshan Punnoose <rpunno...@proteus-technologies.com>
Subject OBR local resource resolving
Date Thu, 15 May 2008 14:30:29 GMT
I am trying to deploy a repository xml through OBR and I noticed that my
<require> tags do not work if I am using the "symbolicname" filter. Looking
through the code, it looks like the LocalRepositoryImpl is adding the header
properties: symbolicName, version, etc, to the Resource directly, and the
import package information is being added as capabilities. However, the
ResolverImpl only looks through the LocalRepositoryImpl's capabilities and
not the Resource map directly.

Here is the current code:

 private List searchLocalResources(Requirement req)
    {
        List matchingCandidates = new ArrayList();
        Resource[] resources = m_local.getResources();
        for (int resIdx = 0; (resources != null) && (resIdx <
resources.length); resIdx++)
        {
            Capability[] caps = resources[resIdx].getCapabilities();
            for (int capIdx = 0; (caps != null) && (capIdx < caps.length);
capIdx++)
            {
                if (req.isSatisfied(caps[capIdx]))
                {
                    matchingCandidates.add(resources[resIdx]);
                }
            }
        }

        return matchingCandidates;
    }


Shouldn't the code actually check if the Requirement (req) is satisfied by
the Resource map (the one that holds the header information: symbolicname,
version) also, instead of only the capability?

Roshan



Mime
View raw message