rptOut.println("> " + bund.getName() + " :");
Set exports = bund.getPossibleExports();
for(Iterator j = exports.iterator(); j.hasNext(); )
{
OsgiPackage pkg = (OsgiPackage) j.next();
if (allImports.contains(pkg))
{
// exports matches imports, move it to resolved list or report
// duplicate if already there
allImports.remove(pkg);
resolvedImports.add(pkg);
rptOut.println(" ... resolved export: " + pkg);
}
else if (resolvedImports.contains(pkg))
{
MangenMain.warning(rptOut, "*** WARNING *** duplicate export, removing: " + pkg);
//TODO: for now we'll suppress the duplicate, which means first
// seen becomes the exporter. Probably need to handle
// better e.g. using versions or wilcard rules in manifest
// to decide who exports
j.remove();
}
else
{
// export doesn't match any imports, so remove it
rptOut.println(" ... removing un-needed export: " + pkg);
j.remove();
}
}
}
rptOut.println("");
// report any unresolved imports
for(Iterator i = allImports.iterator(); i.hasNext(); )
{
OsgiPackage pkg = (OsgiPackage) i.next();
if (!isPackageMatch(pkg, "sys-packages"))
{
MangenMain.warning(rptOut, "*** WARNING *** unresolved import: " + pkg);
}
}