@SuppressWarnings("deprecation")
static KnowledgeBuilder buildKnowledgePackages(KieBaseModelImpl kBaseModel,
KieProject kieProject,
ResultsImpl messages) {
CompositeClassLoader cl = kieProject.getClassLoader(); // the most clone the CL, as each builder and rbase populates it
PackageBuilderConfiguration pconf = new PackageBuilderConfiguration( null,
cl.clone() );
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(pconf);
CompositeKnowledgeBuilder ckbuilder = kbuilder.batch();
Set<String> includes = kBaseModel.getIncludes();