if ( ! newPkg.getResourceTypePackages().isEmpty() ) {
KieWeavers weavers = ServiceRegistryImpl.getInstance().get(KieWeavers.class);
for ( ResourceTypePackage rtkKpg : newPkg.getResourceTypePackages().values() ) {
ResourceType rt = rtkKpg.getResourceType();
KieWeaverService factory = weavers.getWeavers().get( rt );
factory.weave( this, newPkg, rtkKpg );
}
}
this.eventSupport.fireAfterPackageAdded( newPkg );
}