Options xjcOpts = new Options();
xjcOpts.setSchemaLanguage( Language.XMLSCHEMA );
JaxbConfiguration jaxbConfiguration = KnowledgeBuilderFactory.newJaxbConfiguration( xjcOpts, "xsd" );
kfs.write(kieResources.newClassPathResource("person.xsd", getClass())
.setResourceType(ResourceType.XSD)
.setConfiguration(jaxbConfiguration));
if ( rule != null && rule.length() > 0 ) {
kfs.write( "src/main/resources/rule.drl", rule );