Bug 1080578

Summary: Maven Repository URL for project created by org.kie.example=true is incorrect
Product: [Retired] JBoss BPMS Platform 6 Reporter: Petr Široký <psiroky>
Component: Business CentralAssignee: Maciej Swiderski <mswiders>
Status: CLOSED WONTFIX QA Contact: Petr Široký <psiroky>
Severity: low Docs Contact:
Priority: high    
Version: 6.0.0CC: kverlaen, manstis
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-27 11:37:39 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:

Description Petr Široký 2014-03-25 17:22:04 UTC
Description of problem:
When you create a new project in Business Central, the pom.xml of that project contains invalid URL to the BC Maven repo. The url is "<url>/maven2/</url>" and should be something like "<url>http://localhost:8080/business-central/maven2/</url>".


Version-Release number of selected component (if applicable):
6.0.1-CR1


Steps to Reproduce:
1. Create new project.
2. Go to Authoring -> Administration and open the pom.xml file of that project.


Actual results:
The URL to the BC Maven repo is invalid: "/maven2/".

Expected results:
The url should be absolute. Something like"<url>http://localhost:8080/business-central/maven2/</url>".

Additional info:
This seems to be a regression, the URL was correct in previous releases. However I am not sure in which version it got broken.

Comment 1 manstis 2014-03-26 10:42:15 UTC
I tried to replicate with the bpms-6.0.1.CR1/jboss-bpms-6.0.1.GA-redhat-3-deployable-eap6.x.zip download. 

I performed the following steps but was unable to reproduce:-

1) Fresh install of EAP6.1.1, 
2) Overlay the BPMS distribution
3) Add a user
4) Create a new Project
5) Examine the generated pom.xml

This was on Linux.

Comment 2 Petr Široký 2014-03-26 11:52:24 UTC
Michael, my apologies, the newly created project contains the correct URL. I am seeing the incorrect only in the example project (repository1 -> project1 -> pom.xml). Not sure if the example pom.xml is some kind of static resource and could be updated or the something else is going on.

Moving severity to low as the problem is only in the example project. It would probably be nice if it got fixed, but certainly nothing much important.

Comment 3 manstis 2014-03-26 12:16:20 UTC
org.jbpm.console.ng.bd.backend.server.AdministrationServiceImpl.bootstrapProject() creates a new Project with "/" as the base (Repository) URL. This is incorrect and should be the host/web-context of the workbench.

Comment 5 Maciej Swiderski 2014-03-26 16:59:35 UTC
Mike, Petr,

the main issue is that there is no information on the time example project is created about the host/webcontext etc as this is when the application starts. I actually looked at how REST does that and there is same issue, it creates project with / see [1]

so the only thing I see to solve it is to ask for it via system property etc as we cannot rely on any other (at least known to me) approach. What do you think?

any ideas more than welcome.

[1] https://github.com/droolsjbpm/drools-wb/blob/master/drools-wb-rest/src/main/java/org/drools/workbench/common/services/rest/JobRequestHelper.java#L200

Comment 6 Petr Široký 2014-03-26 23:08:53 UTC
Maciej, thanks for the insight. What system properties are you referring to? I am not aware of any standard ones and requiring users to set them is imo not ideal. 

I don't see an easy solution here. I won't mind if you close the issue as won't fix and as it's just a corner case with very low severity. The actual new projects will work correctly.

Comment 7 Maciej Swiderski 2014-03-27 11:37:39 UTC
closing as won't fix as agreed it is corner case