"end\n";
ReleaseId releaseId = KieServices.Factory.get().newReleaseId( "org.test", "test", "1.0.0-SNAPSHOT" );
KieServices ks = KieServices.Factory.get();
KieModuleModel kproj = ks.newKieModuleModel();
KieBaseModel kieBaseModel1 = kproj.newKieBaseModel( "KBase1" )
.addPackage( "org.pkg1" );
kieBaseModel1.newKieSessionModel( "KSession1" );
KieBaseModel kieBaseModel2 = kproj.newKieBaseModel( "KBase2" )
.addPackage( "org.pkg2" )
.addInclude( "KBase1" );
kieBaseModel2.newKieSessionModel( "KSession2" );
KieFileSystem kfs = ks.newKieFileSystem()
.generateAndWritePomXML( releaseId )
.write( "src/main/resources/KBase1/org/pkg1/r1.drl", drl1 )
.writeKModuleXML( kproj.toXML() );
KieBuilder kieBuilder = ks.newKieBuilder( kfs );
kieBuilder.buildAll();
assertEquals( 0, kieBuilder.getResults().getMessages().size() );