I believe the way it is at the moment, the head version must change for it to detect a change in the over all build. I don’t think it detects and updates transitively only.

Mark
On 6 May 2014, at 22:08, Pykhtin, Alex <apykhtin@ebay.com> wrote:

I’m trying to use KieScanner in 6.0.1.Final build and just can’t make it work. Maybe it’s actually an issue with my using of Maven.
 
Here’s my code:
 
       ReleaseId releaseId = ks.newReleaseId( "com.study", "project_jar", "0.0.1-SNAPSHOT" );
       KieContainer kContainer = ks.newKieContainer( releaseId );
       KieSession kSession = kContainer.newKieSession("ksession-rules_jar");
       KieScanner kScanner = ks.newKieScanner( kContainer );
 
Where “com.study” is my fictional domain and “project_jar” is the jar of my project. It has dependency on “drools_jar” which is a kjar of version “0.0.1-SNAPSHOT” (same version for both jars, by the way).
 
Later, I’m trying to test drools_jar updating by doing two things:
 
1.       Rebuilding and deploying drools_jar to the local repository;
2.       Calling kScanner.scanNow()
 
And KieScanner is not picking up the changes.
If I’m deploying drools_jar with the same “0.0.1-SNAPSHOT” version, nothing happens, until the next time I restart my project.
If I’m deploying drools_jar with the new “0.0.2-SNAPSHOT” version, then it’s not a correct dependency and KieScanner is not picking it up (as I expected).
If I’m rebuilding project_jar with a new dependency on “0.0.2-SNAPSHOT” of drools_jar, KieScanner is not picking it up either, but restart helps (as I expected).
 
What is the proper practice of using KieScanner?
 
Thanks,
Alex
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users