Reputation: 792
I am using a drool version 7.x. I am able to get KieScanner to work on my local maven repository using "LATEST". But everytime I update the rules on workbench, I have to manually run mvn install in order to update my local repository so that KieScanner can pickup the changes. Is that how it is? Or is it possible to force a download every time the scanner runs?
I need to fetch the latest jars from my custom repo.
My configuration
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);
}
}
I have configured my custom repo in maven settings file.
<profile>
<id>development</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>customRepo</id>
<url>https://customRepo/v2</url>
<releases>
<enabled>false</enabled>
<updatePolicy>always</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>development</activeProfile>
</activeProfiles>
Exception : Unable to resolve artifact: com.test :LATEST
I have tried all the links below. But no luck
KieScanner cannot fetch LATEST version automatically!
KieScanner with remote maven repo
Loading Drools/KIE Workbench artifacts directly from the repository
How do I tell Maven to use the latest version of a dependency?
how do I tell maven 3.6.3 to get latest version of artifact from custom repository
https://access.redhat.com/solutions/1592893
KieScanner not updating KieSessions at runtime
KieScanner not working in Drools 6.1
KieScanner not updating jar from remote nexus repository (Drools 6.5.0.Final)
Any one please advise to resolve the issue?
Upvotes: 1
Views: 487
Reputation: 1
If you are using SNAPSHOT for version of GAV, you can use [1.0-SNAPSHOT,)
to fetch the newest SNAPSHOT version. The LATEST
can't fetch SNAPSHOT version since it's deprecated in Maven 3.
Upvotes: 0
Reputation: 15179
LATEST
and RELEASE
were Maven 2 keywords. They behaved unpredictably and were removed entirely in Maven 3.
Ref. https://www.baeldung.com/maven-dependency-latest-version#1-deprecated-syntax
Upvotes: 0