0

Referring to the below KieScanner docs. It is specified that KieScanner works with remote maven repo. If I specify a remote maven where my KieJar is kept then at the time of project building all the jars are downloaded in local maven cache. Now my application is up and running.If there any update in remote maven repo then

1) KieScanner will get the update automatically ?

2) Do KieScanner listen on artifacts kept in local maven cache or remote maven repo ?

KieScanner docs

rishi
  • 1,792
  • 5
  • 31
  • 63

1 Answers1

1

(1) You can configure the scanner to look for new versions manually or at certain time intervals:

// Manually run a check for new versions 
scanner.scanNow(); 
// Configure the scanner to check for new versions every 10 seconds
scanner.start( 10_000);

(2) Maven will update the cache automatically when necessary.

Martijn Burger
  • 7,315
  • 8
  • 54
  • 94
  • Thanks for the answer. one thing on 2nd point, How will maven update the cache when remote repo is updated and I have not fired the rebuild of project ? The whole idea here is KieBase should be automatically updated without rebuild/restart of the application. – rishi Oct 24 '16 at 12:22
  • It does update without restarting the application. Updating the cache is handled from the maven side, and not from the application. You should look into the maven `settings.xml` for details. If I am correct, maven checks if the repository is reachable, then looks if the repository and cache are in sync, if not, it updates the cache, if it is in sync or the remote repository is offline the artifacts are served directly from the cache. – Martijn Burger Oct 24 '16 at 14:06