KieServices ks = KieServices.Factory.get();
ReleaseId releaseId1 = ks.newReleaseId("org.kie", "scanner-range-test", "1.0.1");
ReleaseId releaseId2 = ks.newReleaseId("org.kie", "scanner-range-test", "1.0.2");
ReleaseId releaseRange = ks.newReleaseId("org.kie", "scanner-range-test", "[1.0.0,)");
InternalKieModule kJar1 = createKieJar(ks, releaseId1, "rule1", "rule2");
KieContainer kieContainer = ks.newKieContainer(releaseRange);
MavenRepository repository = getMavenRepository();
repository.deployArtifact(releaseId1, kJar1, kPom);
// create a ksesion and check it works as expected
KieSession ksession = kieContainer.newKieSession("KSession1");
checkKSession(ksession, "rule1", "rule2");
// create a new kjar
InternalKieModule kJar2 = createKieJar(ks, releaseId2, "rule2", "rule3");
// deploy it on maven
repository.deployArtifact(releaseId2, kJar2, kPom);
// since I am not calling start() on the scanner it means it won't have automatic scheduled scanning