use of io.fabric8.agent.resolver.Slf4jResolverLog in project fabric8 by jboss-fuse.
the class SubsystemResolver method resolve.
public Map<Resource, List<Wire>> resolve(MetadataBuilder builder, Set<String> overrides, String featureResolutionRange, final org.osgi.service.repository.Repository globalRepository) throws Exception {
if (root == null) {
return Collections.emptyMap();
}
// Download bundles
root.downloadBundles(manager, builder, overrides, featureResolutionRange);
// Populate digraph and resolve
digraph = new StandardRegionDigraph(null, null);
populateDigraph(digraph, root);
Resolver resolver = new ResolverImpl(new Slf4jResolverLog(LOGGER));
Downloader downloader = manager.createDownloader();
wiring = resolver.resolve(new SubsystemResolveContext(root, digraph, globalRepository, downloader));
downloader.await();
// Remove wiring to the fake environment resource
if (environmentResource != null) {
for (List<Wire> wires : wiring.values()) {
for (Iterator<Wire> iterator = wires.iterator(); iterator.hasNext(); ) {
Wire wire = iterator.next();
if (wire.getProvider() == environmentResource) {
iterator.remove();
}
}
}
}
// Fragments are always wired to their host only, so create fake wiring to
// the subsystem the host is wired to
associateFragments();
return wiring;
}
Aggregations