Bug 1035780

Summary: Pom.properties cannot be found even though it's in the war
Product: [Retired] JBoss BRMS Platform 6 Reporter: Ivo Bek <ibek>
Component: BREAssignee: Mario Fusco <mfusco>
Status: CLOSED CURRENTRELEASE QA Contact: Ivo Bek <ibek>
Severity: high Docs Contact:
Priority: high    
Version: 6.0.0CC: etirelli
Target Milestone: ER6   
Target Release: 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
BPMS 6.0.0.ER5
Last Closed: 2014-08-06 20:20:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1035775    
Bug Blocks:    
Attachments:
Description Flags
server log none

Description Ivo Bek 2013-11-28 13:13:04 UTC
Description of problem:

I have a spring application and during the deployment it tries to find pom.properties in the war. Even though it's located in META-INF/maven/org/jboss/springapp/pom.properties, it's not found.

The source code for doing that is located here https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/ClasspathKieProject.java#L167

Consider, that a fix of this bug will influence the reproducer of BZ 1035775, where the getPomProperties method searches for pom.xml as an alternative because of this issue.

How reproducible:

Use the same reproduce steps from BZ 1035775 and the attachments there.

Comment 1 Ivo Bek 2013-11-28 13:23:50 UTC
Created attachment 830234 [details]
server log

Comment 2 Ivo Bek 2013-11-28 13:25:33 UTC
The server log contains:

Unable to load pom.properties tried recursing down from/home/ibek/jboss/jboss-eap-6.1/modules/system/layers/base/sun/jdk/main/service-loader-resources/

so I tried to add pom.properties into that location just to have it as a workaround and it doesn't work either, so there must be something terribly wrong.

Comment 3 Ivo Bek 2013-11-28 13:32:06 UTC
I don't know what is the urlPathToAdd variable but if it's a path to the war, in the source is a condition only for jar files https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/ClasspathKieProject.java#L173

if ( urlPathToAdd.endsWith( ".jar" ) || urlPathToAdd.endsWith( "/content" ) )

It could be one of the reasons why the pom.properties isn't found there.

Comment 5 Ivo Bek 2014-01-08 09:37:43 UTC
Verified in BPMS 6.0.0.ER7