Bug 1038713 - org.kie.lib dependency included in core modules
Summary: org.kie.lib dependency included in core modules
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: Build and Assembly
Version: unspecified
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: ER1
: 6.0.1
Assignee: Jan
QA Contact: Lukáš Petrovický
URL:
Whiteboard:
Depends On:
Blocks: 1038705
TreeView+ depends on / blocked
 
Reported: 2013-12-05 16:36 UTC by kconner
Modified: 2014-08-06 20:04 UTC (History)
11 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-08-06 20:04:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1066258 0 high CLOSED URLResourceManager fails to find url_filter.yaml 2021-02-22 00:41:40 UTC

Internal Links: 1066258

Description kconner 2013-12-05 16:36:57 UTC
The org.kie.lib module is being included in the dependency list of a large number of modules, causing conflicts and failures with existing deployments within FSW.  Many of these appear to be questionable at best.

./system/layers/soa/com/opensymphony/quartz/main/module.xml
./system/layers/soa/org/apache/ant/main/module.xml
./system/layers/soa/org/apache/batik/main/module.xml
./system/layers/soa/org/apache/camel/main/module.xml
./system/layers/soa/org/apache/commons/fileupload/main/module.xml
./system/layers/soa/org/apache/commons/httpclient/main/module.xml
./system/layers/soa/org/apache/commons/jxpath/main/module.xml
./system/layers/soa/org/apache/commons/logging/main/module.xml
./system/layers/soa/org/apache/commons/vfs/main/module.xml
./system/layers/soa/org/apache/helix/main/module.xml
./system/layers/soa/org/apache/lucene/main/module.xml
./system/layers/soa/org/apache/maven/main/module.xml
./system/layers/soa/org/apache/poi/main/module.xml
./system/layers/soa/org/apache/xmlbeans/main/module.xml
./system/layers/soa/org/apache/zookeeper/main/module.xml
./system/layers/soa/org/eclipse/jgit/main/module.xml
./system/layers/soa/org/jboss/solder/main/module.xml
./system/layers/soa/org/junit/main/module.xml
./system/layers/soa/org/kie/lib/main/module.xml
./system/layers/soa/org/sonatype/maven/main/module.xml
./system/layers/soa/org/sonatype/sisu/main/module.xml
./system/layers/soa/org/uberfire/main/module.xml

The specific module causing failures in the current ER7 test build is org.apache.commons.logging:main although the rest need to be investigated and the inclusion of org.kie.lib justified.

Comment 1 kconner 2013-12-05 16:39:28 UTC
Ignore org.kie.lib and org.uberfire from the above list, I forgot to remove them.

Comment 2 Julian Coleman 2013-12-08 11:43:25 UTC
Suspcious dependencies:

  com/opensymphony/quartz/main/module.xml
  (note: compare with:
    https://github.com/jboss-switchyard/release/blob/1.1.1-p2/jboss-as7/modules/src/main/resources/external/quartz/module.xml
  as path name seems incorrect too)
    <module name="org.apache.commons.beanutils" export="true"/>
    <module name="org.apache.commons.logging" export="true"/>
    <module name="javax.transaction.api" export="true"/>
    <module name="org.kie.lib" export="true"/>
    <module name="org.slf4j.jcl-over-slf4j" export="true"/>
    <module name="javax.enterprise.api" export="true"/>
    <module name="javax.rmi.api" export="true"/>
    <module name="javax.ejb.api" export="true"/>
    <module name="javax.jms.api" export="true"/>
    <module name="javax.mail.api" export="true"/>
    <module name="javax.servlet.api" export="true"/>
    <module name="javax.api" export="true"/>

  
  org/eclipse/jgit/main/module.xml
    <module name="org.kie.lib" export="true"/>
    <module name="org.apache.lucene" export="true"/>


  org/sonatype/maven/main/module.xml
    <module name="org.kie.lib" export="true"/>


  org/sonatype/sisu/main/module.xml
    <module name="org.kie.lib" export="true"/>


  org/jboss/solder/main/module.xml
    <module name="org.kie.lib" export="true"/>
    <module name="org.sonatype.sisu" export="true"/>


  org/apache/maven/main/module.xml
    <module name="org.apache.lucene" export="true"/>
    <module name="org.kie.lib" export="true"/>


  org/apache/zookeeper/main/module.xml
    <module name="org.kie.lib" export="true"/>


  org/apache/commons/logging/main/module.xml
  (note that EAP 6.1.1 provides its own apache commons-logging module, so this should
probably be deleted)
    <module name="org.kie.lib" export="true"/>


  org/apache/commons/fileupload/main/module.xml
    <module name="org.kie.lib" export="true"/>
    <module name="org.kie" export="true"/>


  org/apache/commons/jxpath/main/module.xml
    <module name="org.kie.lib" export="true"/>


  org/apache/commons/httpclient/main/module.xml
    <module name="org.kie.lib" export="true"/>


  org/apache/commons/vfs/main/module.xml
    <module name="org.kie.lib" export="true"/>


  org/apache/ant/main/module.xml
    <module name="org.kie.lib" export="true"/>


  org/apache/helix/main/module.xml
    <module name="org.kie.lib" export="true"/>
    <module name="org.kie" export="true"/>


  org/apache/lucene/main/module.xml
    <module name="org.kie.lib" export="true"/>


  org/apache/xmlbeans/main/module.xml
    <module name="org.kie.lib" export="true"/>


  org/apache/camel/main/module.xml
    <module name="org.kie.lib" export="true"/>


  org/apache/batik/main/module.xml
    <module name="org.kie.lib" export="true"/>


  org/apache/poi/main/module.xml
    <module name="org.kie.lib" export="true"/>


  org/junit/main/module.xml
    <module name="org.kie.lib" export="true"/>


General points:

  There are a number of javax.* dependencies in the modules which may or may not be required.

  Some modules depend on both:
    <module name="org.slf4j.jcl-over-slf4j" export="true"/>
    <module name="org.apache.commons.logging" export="true"/>
  which is probably not required, as EAP 6.1.1 aliases the latter to the former.

  The org.kie.lib contains a large collection of other jars, which should probably split up at some point.

Comment 3 Roger Martínez 2013-12-09 20:32:39 UTC
The critical unnecessary dependency to org.kie.lib for module org.apache.commons.logging:main has been fixed.

These are the commits:

- master -> https://github.com/droolsjbpm/kie-wb-distributions/commit/ff78b208bcaca71dc9c9368a59057f732f85e18e

- 6.0.x -> https://github.com/droolsjbpm/kie-wb-distributions/commit/a702f131c009e00e850a42493288f280281186f2

Comment 4 Roger Martínez 2013-12-09 21:02:19 UTC
Hi Kevin,

You are right, there are some unnecessary dependencies. 

We have deleted the critical one for module org.apache.commons.logging. So please try to check if now it's all working fine.

These unnecessary dependencies are inherited from an "old" modules implementation that was done some time ago. 

In this implementation the dependencies between modules are defined manually, so when creating a module the developer must write the explicit dependencies to another modules. This approach is good for a lightweight application, but in drools/jbpm there are a lot of resources, third party libraries and modules to create. In addition there are a lot of people developing and changing the resources and dependencies constantly, so it results very difficult to set the module dependencies sometimes and keep up-to-date.

Due to this BZ, I have started this weekend a new approach to avoid these kind of situations, where the static modules to create will be defined as maven modules, then we can delegate to maven the whole dependency tree generation. This approach will let us to generate the module dependencies and its resources exactly as the application requires.

From my point of view this new approach to implement is a MUST to avoid these kind of problems. So I have opened a new BZ (https://bugzilla.redhat.com/show_bug.cgi?id=1039716) to keep track of this development and finish it as soon as possible. 

So I think the best solution for this BZ is to fix the critical one unnecessary dependency (already done and pushed) and do not waste much time in reviewing/changing the module dependencies manually. I would prefer to finish the new approach and then let maven generate the dependencies for modules exactly as required, then we can review them another time and check if all are correct. It will result easier and faster than performing these changes right now. In addition we split org.kie.lib module in some other ones. 

Thanks

Comment 5 David Gutierrez 2013-12-09 23:12:19 UTC
We guess the fix provided should be enough for the time being. 
Please review it and give feedback. 

As for the improvement Roger is pointing out, it will be available in the next product build (ER7).

Comment 6 Ryan Zhang 2013-12-10 11:04:36 UTC
Ok, let me mark this to target milestone ER6.
(In reply to David Gutierrez from comment #5)
> We guess the fix provided should be enough for the time being. 
> Please review it and give feedback. 
> 
> As for the improvement Roger is pointing out, it will be available in the
> next product build (ER7).

Comment 7 Marek Baluch 2014-01-09 16:40:51 UTC
Verified on ER7.

org.apache.commons.logging module does not depend on org.kie.lib anymore.

The following do (for completeness)
./system/layers/bpms/com/opensymphony/quartz/main/module.xml
./system/layers/bpms/org/eclipse/jgit/main/module.xml
./system/layers/bpms/org/kie/lib/main/module.xml
./system/layers/bpms/org/junit/main/module.xml
./system/layers/bpms/org/uberfire/main/module.xml
./system/layers/bpms/org/apache/poi/main/module.xml
./system/layers/bpms/org/apache/maven/main/module.xml
./system/layers/bpms/org/apache/ant/main/module.xml
./system/layers/bpms/org/apache/batik/main/module.xml
./system/layers/bpms/org/apache/helix/main/module.xml
./system/layers/bpms/org/apache/xmlbeans/main/module.xml
./system/layers/bpms/org/apache/lucene/main/module.xml
./system/layers/bpms/org/apache/commons/jxpath/main/module.xml
./system/layers/bpms/org/apache/commons/httpclient/main/module.xml
./system/layers/bpms/org/apache/commons/fileupload/main/module.xml
./system/layers/bpms/org/apache/commons/vfs/main/module.xml
./system/layers/bpms/org/apache/zookeeper/main/module.xml
./system/layers/bpms/org/apache/camel/main/module.xml
./system/layers/bpms/org/sonatype/maven/main/module.xml
./system/layers/bpms/org/sonatype/sisu/main/module.xml
./system/layers/bpms/org/jboss/solder/main/module.xml

Comment 8 kconner 2014-01-09 21:23:02 UTC
If it is present in the other modules, especially common ones such as httpclient, then I do not consider this to be fixed.

Comment 9 kconner 2014-01-09 21:24:15 UTC
I should add that FSW cannot use any of these modules unless the dependencies are removed.

Comment 10 Marek Baluch 2014-01-09 21:51:52 UTC
Reopening based on Kevin's comment.

Thank you for the feedback.

Comment 11 Roger Martínez 2014-01-09 22:16:23 UTC
Hi Kevin,

Sorry I didn't see your comment until now... tomorrow I will spend the whole day fixing this invalid dependencies.

@Marek: Ok

Thanks

(In reply to kconner from comment #8)
> If it is present in the other modules, especially common ones such as
> httpclient, then I do not consider this to be fixed.

Comment 12 Pedro Zapata 2014-01-10 10:47:16 UTC
I agree that should be fixed. That will be a very risky change to be done the last day before cutting for GA, unless this is absolutely required for FSW GA 1 I recommend this is fixed for 6.0.1 and not for 6.0.0.

Comment 13 kconner 2014-01-11 01:28:31 UTC
FSW are no longer using these modules so we have no objections to deferring the fix

Comment 15 Pedro Zapata 2014-02-04 16:37:35 UTC
There are still problems in dependencies such as https://github.com/droolsjbpm/kie-wb-distributions/blob/6.0.x/kie-eap-integration/kie-eap-integration-core/src/main/resources/eap-modules/modules/org.apache.ant.dependencies

ALL kie.lib dependencies from non BPMS modules should be removed, they are rendundant now.

Comment 16 Jan 2014-02-06 12:58:35 UTC
We have done some additionnal dependency cleaning up (implemented in 6.0.x in http://github.com/droolsjbpm/kie-wb-distributions/commit/71db3713f).

However, not all references to org.kie.lib from non-bpms modules can be removed, not unless we split the org.kie.lib module up.

The remaining org.kie.lib references are from the following modules:

org/eclipse/jgit
org/sonatype/maven
org/apache/helix
org/apache/lucene
org/apache/camel
org/apache/batik
org/apache/commons/validator
org/apache/commons/digester
org/junit

Comment 17 Pedro Zapata 2014-02-06 15:49:16 UTC
The split of org.kie.lib will be committed to master when the new modules build system is merged in. This is still under work and review with the FSW team.

Comment 18 Jan 2014-02-06 16:11:56 UTC
Additionally, it's worth mentioning that:

- we've also dropped the dependency against uberfire from all modules
- all bpms/brms modules are now configured as export="false"

Comment 19 Jan 2014-02-06 17:22:01 UTC
Additonal commit (runtime dependency error corrected):
6.0.x: http://github.com/droolsjbpm/kie-wb-distributions/commit/632edd2c9

Comment 20 Lukáš Petrovický 2014-02-13 22:16:31 UTC
Kevin, can you please verify that the fix meets your requirements and then put it to VERIFIED?

There is not much that QE can do here.

Comment 21 Lukáš Petrovický 2014-05-14 11:35:09 UTC
Given the lack of response from Kevin, I will assume that he is OK with the fixes. VERIFIED.


Note You need to log in before you can comment on or make changes to this bug.