<div dir="ltr">Ciao Mario,<div>thank you for your feedback, I believe could be indeed Maven related, but frankly what led me raise the bug in the Drools Jira, it looks like this is an issue only when Drools is invoking the Maven API ? - all my other Maven workflows with &#39;mvn&#39; builds command are working fine.</div>

<div><br></div><div>Indeed the complexity is due to the requirement where artifactId will be known only at runtime, in my case. That&#39;s why I&#39;ve made that simple test project, because it would simulate the fetch from a remote maven repo - in that case I could parametrize the hardcoded artifactId String to a variable as well.</div>

<div><br></div><div>Here is a question concerning to your last feedback, please.</div><div><br></div><div>Assuming the .m2 local repository is missing completely the com\acme\drools6testmvnlatest.therules directory...</div>

<div>If I specify the remote Maven repo in the settings, the code example provided, should be able to remotely fetch and install from remote repository, right ?</div><div>Because despite my maven remote repositories are specified in the ~/.m2/settings.xml or in the same file passed as the <span style="font-family:arial,sans-serif;font-size:13px">-Dkie.maven.settings.custom= system property, still get the same problem, either I explicit version number, either I ask for RELEASE or LATEST.</span><br>

</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">Example:</span></div><div><div style="font-family:arial,sans-serif;font-size:13px">

D:\inbox&gt;java -jar -Dkie.maven.settings.custom=D:/inbox/settings.xml drools6testmvnlatest.thestandaloneengine-jar-with-dependencies.jar 0.0.2</div><div style="font-family:arial,sans-serif;font-size:13px">2014-02-03 18:28:57,017 [pool-1-thread-1] INFO  com.ning.http.client.providers.netty.NettyAsyncHttpProvider - Number of application&#39;s worked threads is 8</div>

<div style="font-family:arial,sans-serif;font-size:13px">2014-02-03 18:28:57,361 [pool-3-thread-1] INFO  com.ning.http.client.providers.netty.NettyAsyncHttpProvider - Number of application&#39;s worked threads is 8</div>
<div style="font-family:arial,sans-serif;font-size:13px">
Exception in thread &quot;main&quot; java.lang.RuntimeException: Cannot find KieModule: com.acme:drools6testmvnlatest.therules:0.0.2</div><div style="font-family:arial,sans-serif;font-size:13px">        at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:86)</div>

<div style="font-family:arial,sans-serif;font-size:13px">        at com.acme.drools6testmvnlatest.thestandaloneengine.App.main(App.java:24)</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">

I&#39;ve also tried the different combination of windows-horror-slash, just to be sure, but result is always the same.</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">

I attach the content of my settings.xml file below, in case I&#39;m missing something stupid.</div><div style="font-family:arial,sans-serif;font-size:13px">If you can kindly advise what&#39;s your perspective, please, because I&#39;ve rechecked the documentation several times but frankly I think I&#39;m doing all by the book, yet not able to making it recognize the remote maven repo ?</div>

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

MM</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div><div><font face="arial, sans-serif">&lt;settings xmlns=&quot;<a href="http://maven.apache.org/SETTINGS/1.0.0">http://maven.apache.org/SETTINGS/1.0.0</a>&quot;</font></div>

<div><font face="arial, sans-serif">  xmlns:xsi=&quot;<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>&quot;</font></div><div><font face="arial, sans-serif">  xsi:schemaLocation=&quot;<a href="http://maven.apache.org/SETTINGS/1.0.0">http://maven.apache.org/SETTINGS/1.0.0</a></font></div>

<div><font face="arial, sans-serif">                      <a href="http://maven.apache.org/xsd/settings-1.0.0.xsd">http://maven.apache.org/xsd/settings-1.0.0.xsd</a>&quot;&gt;</font></div><div><font face="arial, sans-serif">&lt;profiles&gt;</font></div>

<div><font face="arial, sans-serif">      </font></div><div><font face="arial, sans-serif">&lt;profile&gt;</font></div><div><font face="arial, sans-serif">      &lt;id&gt;nexus-hostname-nexus&lt;/id&gt;</font></div><div>
<font face="arial, sans-serif">      &lt;repositories&gt;</font></div>
<div><font face="arial, sans-serif">        &lt;repository&gt;</font></div><div><font face="arial, sans-serif"><span class="" style="white-space:pre">                        </span>&lt;id&gt;nexus-hostname-nexus&lt;/id&gt;</font></div><div><font face="arial, sans-serif"><span class="" style="white-space:pre">                        </span>&lt;name&gt;nexus-hostname-nexus&lt;/name&gt;</font></div>

<div><font face="arial, sans-serif"><span class="" style="white-space:pre">                        </span>&lt;releases&gt;</font></div><div><font face="arial, sans-serif"><span class="" style="white-space:pre">                                </span>&lt;enabled&gt;true&lt;/enabled&gt;</font></div>

<div><font face="arial, sans-serif"><span class="" style="white-space:pre">                        </span>  &lt;/releases&gt;</font></div><div><font face="arial, sans-serif"><span class="" style="white-space:pre">                        </span>  &lt;snapshots&gt;</font></div>

<div><font face="arial, sans-serif"><span class="" style="white-space:pre">                                </span>&lt;enabled&gt;true&lt;/enabled&gt;</font></div><div><font face="arial, sans-serif"><span class="" style="white-space:pre">                        </span>  &lt;/snapshots&gt;</font></div>

<div><font face="arial, sans-serif"><span class="" style="white-space:pre">                        </span>&lt;url&gt;<a href="http://nexus-hostname/nexus/content/repositories/releases">http://nexus-hostname/nexus/content/repositories/releases</a>&lt;/url&gt;</font></div>

<div><font face="arial, sans-serif"><span class="" style="white-space:pre">                </span>&lt;/repository&gt;</font></div><div><font face="arial, sans-serif"><span class="" style="white-space:pre">                </span>&lt;repository&gt;</font></div>

<div><font face="arial, sans-serif"><span class="" style="white-space:pre">                        </span>&lt;id&gt;nexus-hostname-nexus-snapshots&lt;/id&gt;</font></div><div><font face="arial, sans-serif"><span class="" style="white-space:pre">                        </span>&lt;name&gt;nexus-hostname-nexus&lt;/name&gt;</font></div>

<div><font face="arial, sans-serif"><span class="" style="white-space:pre">                        </span>&lt;releases&gt;</font></div><div><font face="arial, sans-serif"><span class="" style="white-space:pre">                                </span>&lt;enabled&gt;false&lt;/enabled&gt;</font></div>

<div><font face="arial, sans-serif"><span class="" style="white-space:pre">                        </span>  &lt;/releases&gt;</font></div><div><font face="arial, sans-serif"><span class="" style="white-space:pre">                        </span>  &lt;snapshots&gt;</font></div>

<div><font face="arial, sans-serif"><span class="" style="white-space:pre">                                </span>&lt;enabled&gt;true&lt;/enabled&gt;</font></div><div><font face="arial, sans-serif"><span class="" style="white-space:pre">                        </span>  &lt;/snapshots&gt;</font></div>

<div><font face="arial, sans-serif"><span class="" style="white-space:pre">                        </span>&lt;url&gt;<a href="http://nexus-hostname/nexus/content/repositories/snapshots">http://nexus-hostname/nexus/content/repositories/snapshots</a>&lt;/url&gt;</font></div>

<div><font face="arial, sans-serif"><span class="" style="white-space:pre">                </span>&lt;/repository&gt;</font></div><div><span class="" style="white-space:pre"><font face="arial, sans-serif">                        </font></span></div><div><font face="arial, sans-serif">      &lt;/repositories&gt;</font></div>

<div><font face="arial, sans-serif">      &lt;/profile&gt;</font></div><div><font face="arial, sans-serif">      </font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">&lt;/profiles&gt;</font></div>

<div><font face="arial, sans-serif">&lt;activeProfiles&gt;</font></div><div><font face="arial, sans-serif">    &lt;activeProfile&gt;nexus-hostname-nexus&lt;/activeProfile&gt;</font></div><div><font face="arial, sans-serif">  &lt;/activeProfiles&gt;</font></div>

<div><font face="arial, sans-serif">&lt;/settings&gt;</font></div></div></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jan 31, 2014 at 5:47 PM, Mario Fusco <span dir="ltr">&lt;<a href="mailto:mario.fusco@gmail.com" target="_blank">mario.fusco@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ciao Matteo,<br>
<br>
I tried the test case attached to DROOLS-419 and it works for me.<br>
<br>
To be more precise what I tried it is simply installing the kjar you<br>
provided on my local maven repo and check that the main class of your second<br>
project is able to retrieve the kjar and build the drools project using both<br>
LATEST and RELEASE as version.<br>
<br>
I realize the use case you described is quite more complex, but I believe<br>
the additional complexity is all maven related and has nothing to do with<br>
Drools. Moreover if you need to use additional (external) maven repositories<br>
my suggestion is to try to configure them in your settings.xml file. Also be<br>
aware that you can define a location for an alternative settings.xml file<br>
(and then define there the additional repositories you need if you want)<br>
using the system property kie.maven.settings.custom like in:<br>
<br>
java -jar -Dkie.maven.settings.custom=/my/alternative/settings.xml<br>
drools6testmvnlatest.thestandaloneengine-jar-with-dependencies.jar RELEASE<br>
<br>
I hope this helps, but if I am missing some important detail and you still<br>
think the issue you reported could be somewhat related with Drools please<br>
let me know.<br>
<br>
Thanks,<br>
Mario<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/rules-users-Cannot-find-KieModule-with-kieServices-newKieContainer-with-LATEST-or-RELEASE-instead-of-tp4027941p4027957.html" target="_blank">http://drools.46999.n3.nabble.com/rules-users-Cannot-find-KieModule-with-kieServices-newKieContainer-with-LATEST-or-RELEASE-instead-of-tp4027941p4027957.html</a><br>


Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<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>
</div></div></blockquote></div><br></div>