Bug 1263358 - KieBuilder does not read pom.xml from KieFileSystem if setPomModel() is used before buildAll()
Summary: KieBuilder does not read pom.xml from KieFileSystem if setPomModel() is used ...
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ER4
: 6.2.0
Assignee: manstis
QA Contact: Tomas David
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-15 15:57 UTC by Jeremy Lindop
Modified: 2020-03-27 19:05 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-27 19:05:32 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker DROOLS-820 0 None None None Never

Description Jeremy Lindop 2015-09-15 15:57:32 UTC
Description of problem:
If you add a <distributionManagement> section to a pom.xml in a project, when you build and deploy the project the project is not deployed to the repositories specified in the  <distributionManagement> section.

It looks as though the problem is that the jar built by the builder does not contain the pom.xml file in the project. Instead, it contains a bare pom.xml file containing just the GAV for the project.

Version-Release number of selected component (if applicable):
Community Build 6.3.0.CR2
This worked in bpmsuite-6.1.0.GA

How reproducible:

1. Add <distributionManagement> to a project pom
3. Build and deploy

Actual results:
No artifacts are deployed to <distributionManagement> repositories

Expected results:
Artifacts should be deployed to <distributionManagement> repositories

Additional info:
See also https://bugzilla.redhat.com/show_bug.cgi?id=1121179

Comment 2 manstis 2015-09-16 07:53:11 UTC
This issue is caused by the introduction of LRUPomModelCache in Builder. 

Builder's use of LRUPomModelCache makes a call to KieBuilderImpl.setPomModel() before a call to KieBuilderImpl.getPomModel(). The latter sets an instance variable, pomXml, in KieBuilderImpl to the pom.xml written to KieBuilder's "source" KieFileSystem. 

When a call to KieBuilder.buildAll() is made it checks if pomXml is not null and writes the pom.xml (and pom.properties) to the KieModule's "target" FileSystem (that forms the KieModule/KJAR). In this scenario pomXml remains null.

See https://github.com/droolsjbpm/drools/commit/575b48a63e55b5216bf78ecf48621ac8f9f80729

Comment 5 Tomas David 2015-10-23 12:41:33 UTC
Verified on BRMS 6.2.0.ER4.


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