title: KieScanner cannot fetch LATEST version automatically！
body: <p>I want to integrate the drools workbench 6.4.0.Final with my own application. </p>
  
  <p>This below is the main class:</p>
  
  <pre><code>package com.example;
  import com.idss.poc.CouponFact;
  import com.idss.poc.Result;
  import org.codehaus.plexus.util.FileUtils;
  import org.drools.compiler.kie.builder.impl.KieServicesImpl;
  import org.drools.compiler.kproject.ReleaseIdImpl;
  import org.drools.core.io.impl.UrlResource;
  import org.kie.api.KieServices;
  import org.kie.api.builder.KieModule;
  import org.kie.api.builder.KieRepository;
  import org.kie.api.builder.KieScanner;
  import org.kie.api.builder.ReleaseId;
  import org.kie.api.runtime.KieContainer;
  import org.kie.api.runtime.StatelessKieSession;
  import org.kie.scanner.KieScannerFactoryServiceImpl;
  
  import java.io.IOException;
  import java.io.InputStream;
  import java.util.ArrayList;
  import java.util.List;
  import java.util.Scanner;
  
  
  public class FunctionExample {
      public static void main(String[] args) {
          KieServices ks = KieServices.Factory.get();
          ReleaseId releaseId = ks.newReleaseId( "com.test", "poc", "LATEST" );
  
          KieContainer kContainer = ks.newKieContainer(releaseId);
          KieScanner kieScanner = ks.newKieScanner(kContainer);
  
          kieScanner.start( 10000L );
  
          Scanner scanner = new Scanner(System.in);
  
          while (true) {
              kieScanner.scanNow();
              String line = scanner.nextLine();
              runRule(kContainer);
          }
      }
  
      private static void runRule(KieContainer kieKontainer) {
          StatelessKieSession kSession =kieKontainer.newStatelessKieSession("ks");
          Result result = new Result();
          List&lt;String&gt; list = new ArrayList&lt;String&gt;();
          result.setRules(list);
  
          kSession.setGlobal("result", result);
  
          CouponFact cf = new CouponFact();
          cf.setPhoneCount(2);
          cf.setUserCount(2);
          cf.setDeviceCount(2);
          cf.setIp10mCount(10);
          cf.setIpDayCount(10);
          kSession.execute(cf);
  
          System.out.println(result.getScore() + "," + result.getRules());
      }
  }
  </code></pre>
  
  <p>This below is my settings.xml used by own application.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" 
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
            xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"&gt;
    &lt;localRepository&gt;~/.m2/repository&lt;/localRepository&gt;
    &lt;pluginGroups&gt;
    &lt;/pluginGroups&gt;
    &lt;proxies&gt;
    &lt;/proxies&gt;
    &lt;servers&gt;
      &lt;server&gt;
        &lt;id&gt;guvnor-m2-repo&lt;/id&gt;
        &lt;username&gt;workbench&lt;/username&gt;
        &lt;password&gt;workbench!&lt;/password&gt;
        &lt;configuration&gt;
          &lt;wagonProvider&gt;httpclient&lt;/wagonProvider&gt;
          &lt;httpConfiguration&gt;
            &lt;all&gt;
              &lt;usePreemptive&gt;true&lt;/usePreemptive&gt;
            &lt;/all&gt;
          &lt;/httpConfiguration&gt;
        &lt;/configuration&gt;
      &lt;/server&gt;
      &lt;server&gt;
        &lt;id&gt;mymirror&lt;/id&gt;
        &lt;username&gt;workbench&lt;/username&gt;
        &lt;password&gt;workbench!&lt;/password&gt;
        &lt;configuration&gt;
          &lt;wagonProvider&gt;httpclient&lt;/wagonProvider&gt;
          &lt;httpConfiguration&gt;
            &lt;all&gt;
              &lt;usePreemptive&gt;true&lt;/usePreemptive&gt;
            &lt;/all&gt;
          &lt;/httpConfiguration&gt;
        &lt;/configuration&gt;
      &lt;/server&gt;
    &lt;/servers&gt;
    &lt;mirrors&gt;
      &lt;mirror&gt;
        &lt;id&gt;mymirror&lt;/id&gt;
        &lt;url&gt;http://10.10.10.57:8080/kie-wb/maven2&lt;/url&gt;
        &lt;mirrorOf&gt;*&lt;/mirrorOf&gt;
        &lt;layout&gt;default&lt;/layout&gt;
      &lt;/mirror&gt;
    &lt;/mirrors&gt;
    &lt;profiles&gt;
      &lt;profile&gt;
        &lt;id&gt;guvnor-m2-repo&lt;/id&gt;
        &lt;activation&gt;
          &lt;activeByDefault&gt;true&lt;/activeByDefault&gt;
        &lt;/activation&gt;
        &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;guvnor-m2-repo&lt;/id&gt;
              &lt;name&gt;Guvnor M2 Repo&lt;/name&gt;
              &lt;url&gt;http://10.10.10.57:8080/kie-wb/maven2&lt;/url&gt;
              &lt;releases&gt;
                &lt;enabled&gt;true&lt;/enabled&gt;
              &lt;/releases&gt;
              &lt;updatePolicy&gt;always&lt;/updatePolicy&gt;
          &lt;/repository&gt;
        &lt;/repositories&gt;
      &lt;/profile&gt;
    &lt;/profiles&gt;
    &lt;activeProfiles&gt;
     &lt;activeProfile&gt;guvnor-m2-repo&lt;/activeProfile&gt;
    &lt;/activeProfiles&gt;
  &lt;/settings&gt;
  </code></pre>
  
  <p>When I update my drools rule in workbench, and upgrade the version of my repo, but my application do not get the LATEST version of my repo automatically.
  I get the log like this:</p>
  
  <pre><code>11:50:24.158 [Timer-0] DEBUG org.kie.scanner.embedder.MavenEmbedderUtils - Not in OSGi: using plexus based maven parser
  11:50:24.212 [Timer-0] DEBUG org.eclipse.aether.internal.impl.DefaultLocalRepositoryProvider - Using manager EnhancedLocalRepositoryManager with priority 10.0 for /Users/pinter/Desktop/RiskGuard/~/.m2/repository
  11:50:24.212 [Timer-0] DEBUG org.eclipse.aether.internal.impl.DefaultLocalRepositoryProvider - Using manager EnhancedLocalRepositoryManager with priority 10.0 for /Users/pinter/Desktop/RiskGuard/~/.m2/repository
  11:50:24.213 [Timer-0] DEBUG org.eclipse.aether.internal.impl.DefaultRemoteRepositoryManager - Using mirror mymirror (http://10.10.10.57:8080/kie-wb/maven2) for guvnor-m2-repo (http://10.10.10.57:8080/kie-wb/maven2).
  11:50:24.215 [Timer-0] DEBUG org.eclipse.aether.internal.impl.DefaultRemoteRepositoryManager - Using mirror mymirror (http://10.10.10.57:8080/kie-wb/maven2) for guvnor-m2-repo (http://10.10.10.57:8080/kie-wb/maven2).
  11:50:24.215 [Timer-0] DEBUG org.eclipse.aether.internal.impl.DefaultRemoteRepositoryManager - Using mirror mymirror (http://10.10.10.57:8080/kie-wb/maven2) for central (https://repo.maven.apache.org/maven2).
  11:50:24.216 [Timer-0] DEBUG org.eclipse.aether.internal.impl.DefaultDependencyCollector - Dependency collection stats: {ConflictMarker.analyzeTime=0, ConflictMarker.markTime=0, ConflictMarker.nodeCount=1, ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=0, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=0, ConflictResolver.conflictItemCount=0, DefaultDependencyCollector.collectTime=0, DefaultDependencyCollector.transformTime=0}
  11:50:24.217 [Timer-0] DEBUG org.eclipse.aether.internal.impl.DefaultLocalRepositoryProvider - Using manager EnhancedLocalRepositoryManager with priority 10.0 for ~/.m2/repository
  11:50:24.217 [Timer-0] DEBUG org.eclipse.aether.internal.impl.DefaultUpdateCheckManager - Skipped remote request for com.idss:poc/maven-metadata.xml, locally cached metadata up-to-date.
  </code></pre>
  
  <p>Can anyone help me to figure it out? Thank you!</p>