<div dir="ltr">Hello Mark, yes, <span style="font-family:arial,sans-serif;font-size:13px">kie-ci is on the class path, is the only dependency declared in the project pom, so this gets resolved inside the .jar at package time.</span><div>

<span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">I&#39;ve tested suggestion from Mario which will follow in separate email.</span></div>

<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Thanks for your feedback anyway</span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Ciao,</span></div>

<div><span style="font-family:arial,sans-serif;font-size:13px">MM</span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">

On Fri, Jan 31, 2014 at 4:37 PM, Mark Proctor <span dir="ltr">&lt;<a href="mailto:mproctor@codehaus.org" target="_blank">mproctor@codehaus.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div style="word-wrap:break-word">Just want to check that you have kie-ci on the class path? As this is necessary to resolve meta versions using maven. Otherwise only explicit versions will work, on the local m2 cache only.<span class="HOEnZb"><font color="#888888"><div>

<br></div></font></span><div><span class="HOEnZb"><font color="#888888">Mark</font></span><div><div class="h5"><br><div><br></div><div><br><div><div>On 31 Jan 2014, at 10:00, Matteo Mortari &lt;<a href="mailto:matteo.mortari@gmail.com" target="_blank">matteo.mortari@gmail.com</a>&gt; wrote:</div>

<br><blockquote type="cite"><div dir="ltr">Hello Mark,<div><div>For reference, I&#39;ve attached to the original Jira DROOLS-419 zip file with source code and detailed instruction how to replicate issue, and how to replicate workaround as well. That is the simple code I&#39;ve used to replicate the issue on Windows box and Linux box before submitting the jira bug entry.</div>



</div><div><br></div><div>Concerning your question to provide unit test, I have to admit I&#39;m a bit lost how could this be achieved ?</div><div>As this is more of an integration aspect than code, if I was to write a JUnit for this, it would require to 1 empty .m2 local repo directory, 2 provide an &quot;embedded nexus&quot; (not sure if actually feasible) and 3 perform maven commands from shell, not by direct use of the API. 4 do the kie api call to trigger the stack trace.</div>



<div><br></div><div>So, can I kindly know if zip file and instructions with Jira DROOLS-419 are sufficient, or I shall investigate further if and how to self-contain all of this in a JUnit test, please?</div><div><br></div>



<div>Thank you for your feedback</div><div>MM</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jan 31, 2014 at 1:44 AM, Mark Proctor <span dir="ltr">&lt;<a href="mailto:mproctor@codehaus.org" target="_blank">mproctor@codehaus.org</a>&gt;</span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Can you create a unit test that reproduces your issue. Something that follows this:<div>



<a href="https://github.com/droolsjbpm/drools/blob/master/kie-ci/src/test/java/org/kie/scanner/KieRepositoryScannerTest.java" target="_blank">https://github.com/droolsjbpm/drools/blob/master/kie-ci/src/test/java/org/kie/scanner/KieRepositoryScannerTest.java</a></div>



<div><br></div><div><a href="http://docs.jboss.org/drools/release/5.6.0.Final/droolsjbpm-introduction-docs/html/gettingstarted.html" target="_blank">http://docs.jboss.org/drools/release/5.6.0.Final/droolsjbpm-introduction-docs/html/gettingstarted.html</a></div>



<div><br></div><div>Mark<br><div><br></div><div><br><div><div><div><div>On 30 Jan 2014, at 19:49, Matteo Mortari &lt;<a href="mailto:matteo.mortari@gmail.com" target="_blank">matteo.mortari@gmail.com</a>&gt; wrote:</div>



<br></div></div><blockquote type="cite"><div><div><div dir="ltr">Hello,<div>in the hope this could save time if someone has been experiencing same issue. Drools 6.0.1.Final</div><div><br></div><div>I had message &quot;Cannot find KieModule&quot; with kieServices.newKieContainer() with LATEST or RELEASE , instead of explicit version number (eg: 0.0.1) on a application where the KIE module Rule artifact project kjar has been locally-installed from remote Maven repository, that is the right hand side of this diagram: <a href="http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html_single/#d0e933" target="_blank">http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html_single/#d0e933</a></div>





<div><br></div><div><div>Meaning that before launching Application, I performed</div><div>mvn org.apache.maven.plugins:maven-dependency-plugin:2.8:get -Dartifact=com.acme:X:LATEST -DrepoUrl=<a href="http://nexus-hostname/nexus/content/repositories/releases/" target="_blank">http://nexus-hostname/nexus/content/repositories/releases/</a></div>





</div><div><br></div><div>Then:</div><div>kieServices.newKieContainer() with LATEST, </div><div>kieServices.newKieContainer() with RELEASE,</div><div><br></div><div>failed with stack trace:</div><div><div>Exception in thread &quot;main&quot; java.lang.RuntimeException: Cannot find KieModule: com.acme:X:RELEASE</div>





<div>        at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:86)</div><div>        at (...)</div></div><div><br></div><div>But kieServices.newKieContainer() with a fixed version, eg.: 0.0.2 did indeed worked OK, if installed in the local .m2 repository.</div>





<div><br></div><div>To avoid this issue, I found only 3 possible workarounds</div><div>1 use mvn maven-dependency-plugin:go-offline but did not work all of the time</div><div>2 manually ensure maven-metadata-local.xml file is generate in local .m2 repository</div>





<div>3 just download manually .jar and .pom of the remote maven repo, and then install with mvn install:install-file </div><div><br></div><div>In this case, of workaround kieServices.newKieContainer()  works OK with all the version LATEST, RELEASE, and fixed version number.</div>





<div><br></div><div>Raise jira DROOLS-419 with more details and example projects, please don&#39;t hate me if was just me missing something or not-Drools issue actually</div><div>=P</div><div>In my defense I had good intentions saving somebody&#39;s else time in case same strange behavior, which is really strange because to me it worked only with explicit fixed version number, and that was really bizarre ;)</div>





<div><br></div><div>Hope this helps,</div><div>Ciao</div><div>MM</div></div></div></div>
_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a></blockquote>



</div><br></div></div></div><br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote></div><br></div>
_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a></blockquote>

</div><br></div></div></div></div></div><br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote></div><br></div>