[jboss-jira] [JBoss JIRA] (DROOLS-373) Kie Maven plugin don't use the project classpath
Matteo Mortari (JIRA)
issues at jboss.org
Thu Jan 9 09:43:32 EST 2014
[ https://issues.jboss.org/browse/DROOLS-373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matteo Mortari updated DROOLS-373:
----------------------------------
Attachment: drools6scratch-kiemavenclasspath.zip
I've made a quick example project, to prove the point, but from my side this still does not work.
The project is a KIE project, and has a dependency, enlisted in maven pom as:
{code:xml}
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.1</version>
</dependency>
{code}
Then there is a very simple DRL file, for very dummy rules:
{code:title=package.drl}
package com.acme.drools6scratch_kiemavenclasspath
global org.apache.commons.lang3.tuple.ImmutablePair ip;
import org.apache.commons.lang3.tuple.* ;
rule "prova"
when
$ip : ImmutablePair()
then
System.out.println("detected");
end
{code}
Now.
If you run maven lifecycle with the pom in the current state, it will fail with:
{noformat}
[INFO] --- kie-maven-plugin:6.0.1.Final:build (default-build) @ drools6scratch-kiemavenclasspath ---
java.lang.ClassNotFoundException: Unable to find class 'org.apache.commons.lang3.tuple.ImmutablePair'
{noformat}
Actually, if you enlist the 'commons-lang3' dependency ALSO inside the kie-maven-plugin by removing the commented part in the pom, then kie-maven-plugin will be able to compile without the error above.
I think this issue was meant to avoid exactly this situation which happened in 6.0.0 ?
I'm using 6.0.1.Final.
Maybe I'm doing something wrong from my side, but could you kindly evaluate if actually necessary to put this issue in status reopened, please?
Thanks, Ciao!
> Kie Maven plugin don't use the project classpath
> ------------------------------------------------
>
> Key: DROOLS-373
> URL: https://issues.jboss.org/browse/DROOLS-373
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Reporter: Mario Fusco
> Assignee: Mario Fusco
> Fix For: 6.0.1.Final
>
> Attachments: drools6scratch-kiemavenclasspath.zip
>
>
> When compiling drls the kie maven plugin uses the plugin classpath instead of the project one. This imply that it is necessary to duplicate the dependencies used by the kie project also inside the plugin declaration, as reported by this email: http://drools.46999.n3.nabble.com/rules-users-Drool-6-0-0-Final-2-question-re-kie-maven-plugin-please-td4027117.html
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list