maven


Drools KieScanner cannot fetch SNAPSHOT version automatically!


I want to integrate the drools workbench 6.5.0.Final with my application.
the code are as follows:
private static void test() throws InterruptedException {
KieServices kServices = KieServices.Factory.get();
ReleaseId releaseId = kServices.newReleaseId("com.risk", "core-engine-test", "1.0.0-SNAPSHOT");
kContainer = kServices.newKieContainer(releaseId);
KieScanner kScanner = kServices.newKieScanner(kContainer);
kScanner.start(10000L);
Person p = new Person("郭芙蓉", 8);
System.out.println("orig p1 : " + p);
while (true) {
Thread.sleep(5000);
KieSession ksession = kContainer.newKieSession("testSession");
ksession.insert(p);
ksession.fireAllRules();
System.out.println("after p1 : " + p);
ksession.dispose();
}
}
This below is my settings.xml used by own application.
<mirrors>
<mirror>
<id>nexus</id>
<url>http://10.240.132.81:8081/nexus/content/groups/public/</url>
<name>nexus</name>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
I was install and deploy kjar into my nexus repository.When I was start app at the first time, it will write a tracking file named "resolver-status.properties", and this file record some timstamp , so local server don't fetch newer jar any more which is newer in nexus-server.I got such logs:
05-10 15:59:48.657 Not in OSGi: using plexus based maven parser
05-10 15:59:50.168 Using manager EnhancedLocalRepositoryManager with priority 10.0 for /home/username/.m2/repository
05-10 15:59:50.175 Using manager EnhancedLocalRepositoryManager with priority 10.0 for /home/username/.m2/repository
05-10 15:59:50.231 Using mirror nexus (http://10.240.132.81:8081/nexus/content/groups/public/) for central (https://repo.maven.apache.org/maven2).
05-10 15:59:50.262 Using manager EnhancedLocalRepositoryManager with priority 10.0 for /home/username/.m2/repository
05-10 15:59:50.277 KieModule Lookup. ReleaseId com.risk:core-engine-test:1.0.0-SNAPSHOT was not in cache, checking classpath
05-10 15:59:50.277 KieModule Lookup. ReleaseId com.risk:core-engine-test:1.0.0-SNAPSHOT was not in cache, checking maven repository
05-10 15:59:50.288 Skipped remote request for com.risk:core-engine-test:1.0.0-SNAPSHOT/maven-metadata.xml, locally cached metadata up-to-date.
05-10 15:59:50.588 Skipped remote request for com.risk:core-engine-test:1.0.0-SNAPSHOT/maven-metadata.xml, locally cached metadata up-to-date.
05-10 15:59:50.588 Skipped remote request for com.risk:core-engine-test:1.0.0-SNAPSHOT/maven-metadata.xml, locally cached metadata up-to-date.
05-10 15:59:50.589 Skipped remote request for com.risk:core-engine-test:1.0.0-SNAPSHOT/maven-metadata.xml, locally cached metadata up-to-date.
05-10 15:59:50.608 Dependency collection stats: {ConflictMarker.analyzeTime=1, ConflictMarker.markTime=1, ConflictMarker.nodeCount=1, ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=1, ConflictIdSorter.conflictIdCount=1, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=3, ConflictResolver.conflictItemCount=1, DefaultDependencyCollector.collectTime=18, DefaultDependencyCollector.transformTime=10}
Can anyone help me to figure it out? Thank you!
At the moment LATEST works pretty well provided that you always use fixed versions. Conversely if you try to use it with SNAPSHOTs it is indeed broken and it is impossible to make it work.
As per the mail chain[1], the answer has been just that "LATEST is broken by design". [1] However it is also stated on the Maven documentation that "For the sake of reproducible builds, Maven 3.x no longer supports usage of these metaversions". [2]
[1] https://dev.eclipse.org/mhonarc/lists/aether-users/msg00529.html
[2] https://cwiki.apache.org/confluence/display/MAVEN/Maven+3.x+Compatibility+Notes#Maven3.xCompatibilityNotes-PluginMetaversionResolution

Related Links

How to pack a jar without dependency classes in gradle similar to maven
Android library with 3rd party transitive dependencies with Artifactory
How can I override `distributionManagement` of module POM in a reactor POM?
Dependency Injection failure during mvn install loading standalone run
mvn appengine:update will not deploy due to permissions error
Using two instance of maven in one desktop
Excluding folders/files from specific folder in pom.xml [duplicate]
Error of maven webxml attribute is required but i have my web xml?
Mule: building embedded application with Maven
Maven Timestamp Error
Executing tests in parallel using mvn test command
Remote EJB Lookup to JBoss 5 from EJB Deployed in JBoss 6 + java.lang.ClassCastException: com.sun.proxy.$Proxy81
A snapshot deployed on a private Maven repo could not be found by SBT client
Howto cleanup build environment with maven-invoker-plugin
How to fail maven goal sonar:sonar based on quality gates
Can't add dynamic property to Maven's resource located at build path

Categories

HOME
client
osgi
jdo
keycloak
reflection
push-notification
path-finding
relayjs
tesseract
adb
amortized-analysis
ojdbc
ezpublish
onelogin
django-imagekit
multiple-records
contact
metatrader4
fancybox-3
user-input
modx-revolution
spring-tool-suite
alignment
circuit
iolanguage
graphicsmagick
css-animations
kudan
language-agnostic
numerical-methods
tdd
status
spring-mybatis
neo4j-spatial
log4js-node
atlassian-crucible
madlib
junit5
gtrendsr
form-data
hexo
ios5
restlet
az-application-insights
opshub
azure-ml
password-encryption
babel-core
logfiles
menuitem
dropbox-php
sqlclient
ifs
cudafy.net
flutterwave
arrow-keys
mcafee
django-scheduler
smart-table
or-tools
watchconnectivity
etsy
angstrom-linux
captivenetwork
tform
associative-array
browser-link
freelancer.com-api
spim
content-length
tableau-online
responsive-images
clipperlib
device-orientation
fscommand
codeigniter-url
coldbox
neolane
code-access-security
rdl
project-planning
android-radiobutton
article
fluentautomation
system.net.webexception
srs
listings
jplaton
qt-faststart
django-nonrel
pushbackinputstream
eventlistener
hamiltonian-cycle
dice
multipage
hosts-file
javax.script
coda-slider
suppress
forums

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App