[jboss-jira] [JBoss JIRA] (DROOLS-531) KieServices.Factory.get().getKieClasspathContainer() doesn't discover KieModules in a non-Maven project
RH Bugzilla Integration (JIRA)
issues at jboss.org
Fri Sep 5 02:17:00 EDT 2014
[ https://issues.jboss.org/browse/DROOLS-531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12999180#comment-12999180 ]
RH Bugzilla Integration commented on DROOLS-531:
------------------------------------------------
Ryan Zhang <rzhang at redhat.com> changed the Status of [bug 1117114|https://bugzilla.redhat.com/show_bug.cgi?id=1117114] from MODIFIED to ON_QA
> KieServices.Factory.get().getKieClasspathContainer() doesn't discover KieModules in a non-Maven project
> -------------------------------------------------------------------------------------------------------
>
> Key: DROOLS-531
> URL: https://issues.jboss.org/browse/DROOLS-531
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 6.1.0.CR1
> Reporter: Michael Anstis
> Assignee: Mario Fusco
> Labels: backport-to-6.0.x
> Fix For: 6.1.0.Final
>
>
> If you try to use a ClassPath Container KieContainerImpl uses a ClasspathKieProject that scans the classpath for pom.xml or pom.properties files. If the consuming project is not a Maven project (and hence lacks either a pom.xml or pom.properties file) no KBases/KSessions defined in the consuming project's kmodule.xml and /resources folder are discovered.
> This also manifests as a problem when running Maven WebApp projects in IDEA (other IDE's and project types may be similarly affected). IDEA copies the JARs sources and resources to the target folder at runtime; which excludes the module's pom.xml and pom.properties files.
> Consequentially ClasspathKieProject fails to determine a ReleaseId for any KieModules defined in the module and hence fails to discover any KBases/KSessions too.
> See https://github.com/ederign/uf-social-activities/blob/master/uberfire-social-activities/uberfire-social-activities-backend/src/main/java/org/uberfire/social/activities/drools/SocialTimelineRulesQuery.java#L43 where we try to use a named KSession.
> This is defined in https://github.com/ederign/uf-social-activities/blob/master/uberfire-social-activities/uberfire-social-activities-backend/src/main/resources/META-INF/kmodule.xml
> Rules being in https://github.com/ederign/uf-social-activities/tree/master/uberfire-social-activities/uberfire-social-activities-backend/src/main/resources/org/uberfire/social/activities/drools-rules
> Workaround is to include a dummy pom.properties; as we did here https://github.com/ederign/uf-social-activities/blob/master/uberfire-social-activities/uberfire-social-activities-backend/src/main/resources/META-INF/maven/pom.properties
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
More information about the jboss-jira
mailing list