title: Running Drools as a fat jar(Compile drools into jar)
body: <p><strong>Problem:</strong></p>
  <p>When I runs my test or run my application from the main method drools initialize fine and every thing works.  BUT as soon as I compile my application to a jar file (as a fat jar), this code throws a <code>NullPointerException</code>.</p>
  <pre><code>KieServices ks = KieServices.Factory.get();
  kieContainer = ks.getKieClasspathContainer(); // ks is null
  </code></pre>
  <p>I have also notice that when running it from my ide the ServiceDiscovery finds a lot more kie.conf files.</p>
  <p>Running it from IDE</p>
  <pre><code>2018-05-09 18:18:12,219 [monthEnd] INFO  org.kie.api.internal.utils.ServiceDiscoveryImpl - Loading kie.conf from  
  2018-05-09 18:18:12,221 [monthEnd] INFO  org.kie.api.internal.utils.ServiceDiscoveryImpl - Discovered kie.conf url=jar:file:/C:/Users/alece/.m2/repository/org/drools/drools-decisiontables/7.6.0.Final/drools-decisiontables-7.6.0.Final.jar!/META-INF/kie.conf 
  2018-05-09 18:18:12,307 [monthEnd] INFO  org.kie.api.internal.utils.ServiceDiscoveryImpl - Adding Service org.drools.decisiontable.DecisionTableProviderImpl
  
  2018-05-09 18:18:12,307 [monthEnd] INFO  org.kie.api.internal.utils.ServiceDiscoveryImpl - Loading kie.conf from  
  2018-05-09 18:18:12,308 [monthEnd] INFO  org.kie.api.internal.utils.ServiceDiscoveryImpl - Discovered kie.conf url=jar:file:/C:/Users/alece/.m2/repository/org/kie/kie-internal/7.6.0.Final/kie-internal-7.6.0.Final.jar!/META-INF/kie.conf 
  2018-05-09 18:18:12,311 [monthEnd] INFO  org.kie.api.internal.utils.ServiceDiscoveryImpl - Adding Service org.kie.internal.services.KieWeaversImpl
  
  2018-05-09 18:18:12,313 [monthEnd] INFO  org.kie.api.internal.utils.ServiceDiscoveryImpl - Adding Service org.kie.internal.services.KieBeliefsImpl
  
  2018-05-09 18:18:12,314 [monthEnd] INFO  org.kie.api.internal.utils.ServiceDiscoveryImpl - Adding Service org.kie.internal.services.KieAssemblersImpl
  
  2018-05-09 18:18:12,315 [monthEnd] INFO  org.kie.api.internal.utils.ServiceDiscoveryImpl - Adding Service org.kie.internal.services.KieRuntimesImpl
  
  2018-05-09 18:18:12,316 [monthEnd] INFO  org.kie.api.internal.utils.ServiceDiscoveryImpl - Loading kie.conf from  
  2018-05-09 18:18:12,316 [monthEnd] INFO  org.kie.api.internal.utils.ServiceDiscoveryImpl - Discovered kie.conf url=jar:file:/C:/Users/alece/.m2/repository/org/drools/drools-core/7.6.0.Final/drools-core-7.6.0.Final.jar!/META-INF/kie.conf 
  2018-05-09 18:18:12,319 [monthEnd] INFO  org.kie.api.internal.utils.ServiceDiscoveryImpl - Adding Service org.drools.core.io.impl.ResourceFactoryServiceImpl
  
  2018-05-09 18:18:12,323 [monthEnd] INFO  org.kie.api.internal.utils.ServiceDiscoveryImpl - Adding Service org.drools.core.marshalling.impl.MarshallerProviderImpl
  
  2018-05-09 18:18:12,335 [monthEnd] INFO  org.kie.api.internal.utils.ServiceDiscoveryImpl - Adding Service org.drools.core.concurrent.ExecutorProviderImpl
  
  2018-05-09 18:18:12,335 [monthEnd] INFO  org.kie.api.internal.utils.ServiceDiscoveryImpl - Loading kie.conf from  
  2018-05-09 18:18:12,336 [monthEnd] INFO  org.kie.api.internal.utils.ServiceDiscoveryImpl - Discovered kie.conf url=jar:file:/C:/Users/alece/.m2/repository/org/drools/drools-compiler/7.6.0.Final/drools-compiler-7.6.0.Final.jar!/META-INF/kie.conf 
  2018-05-09 18:18:12,348 [monthEnd] INFO  org.kie.api.internal.utils.ServiceDiscoveryImpl - Adding Service org.drools.compiler.kie.builder.impl.KieServicesImpl
  
  2018-05-09 18:18:12,357 [monthEnd] INFO  org.kie.api.internal.utils.ServiceDiscoveryImpl - Adding Service org.drools.compiler.builder.impl.KnowledgeBuilderFactoryServiceImpl
  </code></pre>
  <p>Running compiled jar</p>
  <pre><code>2018-05-09 18:14:02,771 [monthEnd] INFO  org.kie.api.internal.utils.ServiceDiscoveryImpl - Loading kie.conf from
  2018-05-09 18:14:02,772 [monthEnd] INFO  org.kie.api.internal.utils.ServiceDiscoveryImpl - Discovered kie.conf url=jar:file:/C:/Users/alece/git-idea/directpay-monthend/target/monthend-1.0.0.jar!/META-INF/kie.conf
  2018-05-09 18:14:02,773 [monthEnd] INFO  org.kie.api.internal.utils.ServiceDiscoveryImpl - Adding Service org.drools.decisiontable.DecisionTableProviderImpl
  </code></pre>
  <p>My pom file</p>
  <pre><code>&lt;properties&gt;
        &lt;drools.version&gt;7.6.0.Final&lt;/drools.version&gt;
  &lt;/properties&gt;
          &lt;!-- Drools --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.kie&lt;/groupId&gt;
              &lt;artifactId&gt;kie-api&lt;/artifactId&gt;
              &lt;version&gt;${drools.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.drools&lt;/groupId&gt;
              &lt;artifactId&gt;drools-decisiontables&lt;/artifactId&gt;
              &lt;version&gt;${drools.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.drools&lt;/groupId&gt;
              &lt;artifactId&gt;drools-core&lt;/artifactId&gt;
              &lt;version&gt;${drools.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.drools&lt;/groupId&gt;
              &lt;artifactId&gt;drools-compiler&lt;/artifactId&gt;
              &lt;version&gt;${drools.version}&lt;/version&gt;
          &lt;/dependency&gt;
  </code></pre>
  <p>Thanks in advance.</p>