private void resolveInEnvironment(Environment env, List<Resource> unresolved, Map<Requirement, Resource> mapping, Set<Requirement> unstatisfied, List<Resource> resources) {
Set<Resource> mandatory = new LinkedHashSet<Resource>();
mandatory.addAll(unresolved);
mandatory.addAll(resources);
try {
ResolveContext context = new DefaultResolveContext(env, mandatory, null);
Set<Entry<Resource, List<Wire>>> wiremap = resolver.resolve(context).entrySet();
for (Entry<Resource, List<Wire>> entry : wiremap) {
for (Wire wire : entry.getValue()) {
Requirement req = wire.getRequirement();
Resource provider = wire.getProvider();