[jboss-jira] [JBoss JIRA] (DROOLS-531) KieServices.Factory.get().getKieClasspathContainer() doesn't discover KieModules in a non-Maven project

Mario Fusco (JIRA) issues at jboss.org
Tue Jul 8 14:16:26 EDT 2014


     [ https://issues.jboss.org/browse/DROOLS-531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mario Fusco updated DROOLS-531:
-------------------------------

    Labels: backport-to-6.0.x  (was: )


> 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.2.6#6264)


More information about the jboss-jira mailing list