private KnowledgeBuilder compositeBuild(List<ResourceDescr> resources, Map<Resource, ResourceDescr> resourceMap) throws CoreException {
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(getBuilderConfiguration(resources));
CompositeKnowledgeBuilder compositeKBuilder = kbuilder.batch();
for (ResourceDescr resourceDescr : resources) {
Resource resource = resourceDescr.getContentAsDroolsResource();
resourceMap.put(resource, resourceDescr);
compositeKBuilder.add(resource, resourceDescr.getType());
}
try {
compositeKBuilder.build();