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
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
Verified on BRMS 6.2.0.ER4.