title: Deploy programatically created KIE-Drools-Artifact to Maven repository
body: <p>Is there a way to deploy a programatically created Drools 6 artifact to the underlying maven repository? I do NOT want to explicitly somehow call <code>mvn deploy</code> but do that from the program itself:</p>
  
  <pre><code>public static void main(String[] args) {
      String ruleString = "rule \"TestRule\"\nthen\nSystem.out.println(\"This is a testrule.\");\nend";
  
      KieServices kieServices = KieServices.Factory.get();
  
      KieModuleModel kieModuleModel = kieServices.newKieModuleModel();
      KieBaseModel kieBaseModel = kieModuleModel.newKieBaseModel("testbase1").setDefault(true);
      KieSessionModel kieSessionModel = kieBaseModel.newKieSessionModel("testsession1").setDefault(true).setType(KieSessionModel.KieSessionType.STATELESS);
  
      KieFileSystem kieFileSystem = kieServices.newKieFileSystem();
      kieFileSystem.generateAndWritePomXML(new ReleaseIdImpl("de.itm.test", "testartifact", "0.0.1-SNAPSHOT"));
      kieFileSystem.write("src/main/resources/testbase1/rule1.drl", ruleString);
  
      KieBuilder kieBuilder = kieServices.newKieBuilder(kieFileSystem).buildAll();
  
      // how to now deploy the new artifact so it is available on disc, e.g. in ~/.m2/repository/de/itm/test/test/testartifact/0.0.1-SNAPSHOT/ ?
  }
  </code></pre>