title: Loading Drools/KIE Workbench artifacts directly from the repository
body: <p>We try to switch to Drools 6 with the all new KIE workbench (formerly known as Guvnor) and the new maven-based artifacts.</p>
  
  <p>Now I'd like to use the the system described in <a href="http://blog.athico.com/2013/12/deployment-with-drools-60.html" rel="noreferrer">this blog post</a> in the second image ("Deployment"): Loading the rules via HTTP from the workbench repository (the dotted arrow, going from HTTP on the left directly into the application).</p>
  
  <p>The problem is, that I have no idea how to load the artifact into my KieServices/KieModule object. I basically do not want to use maven, I also cannot provide the path to maven's <code>settings.xml</code> globally as a Java parameter, so this option is out.</p>
  
  <p>I think that a similar issue is <a href="https://stackoverflow.com/questions/20995133/why-does-loading-drools-6-kie-jar-into-code-fail">this one</a>. As mentioned there, I also tried to load an URL resource but the problem seems to be that the system cannot determine, what kind of <code>ResourceType</code> the given URL (<code>http://localhost:8080/kie-drools/maven2/.../-1.0.0.jar</code>) is. And yes, I can access the .jar from the repository directly from the browser, without authentication.</p>
  
  <p>Any ideas or tutorials how to do this?</p>
  
  <p>My testing code:</p>
  
  <pre><code>public static void main(String[] args) {
      KieServices ks = KieServices.Factory.get();
      KieRepository repo = ks.getRepository();
  
      String url = "http://localhost:8080/kie-drools/maven2/de/test/test/1.0.0/test-1.0.0.jar";
  
      Resource urlResource = ks.getResources().newUrlResource(url);
      KieModule kModule = repo.addKieModule(urlResource); // this already fails
  }
  </code></pre>
  
  <p>The error:</p>
  
  <pre><code>Exception in thread "main" java.lang.RuntimeException: Unable to fetch module from resource :[UrlResource path='http://localhost:8080/kie-drools/maven2/de/itm/Herma400/1.0.1/Herma400-1.0.1.jar']
      at org.drools.compiler.kie.builder.impl.KieRepositoryImpl.getKieModule(KieRepositoryImpl.java:205)
      at org.drools.compiler.kie.builder.impl.KieRepositoryImpl.addKieModule(KieRepositoryImpl.java:161)
      at kieTest.MainKieTest.main(MainKieTest.java:24)
  Caused by: java.lang.NullPointerException
      at org.drools.compiler.kie.builder.impl.ClasspathKieProject.getPomProperties(ClasspathKieProject.java:197)
      at org.drools.compiler.kie.builder.impl.ClasspathKieProject.fetchKModule(ClasspathKieProject.java:148)
      at org.drools.compiler.kie.builder.impl.ClasspathKieProject.fetchKModule(ClasspathKieProject.java:109)
      at org.drools.compiler.kie.builder.impl.KieRepositoryImpl.getKieModule(KieRepositoryImpl.java:190)
      ... 2 more
  </code></pre>
  
  <p>Thanks in advance!</p>