Bug 1080578 - Maven Repository URL for project created by org.kie.example=true is incorrect
Summary: Maven Repository URL for project created by org.kie.example=true is incorrect
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
high
low
Target Milestone: ---
: ---
Assignee: Maciej Swiderski
QA Contact: Petr Široký
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-25 17:22 UTC by Petr Široký
Modified: 2014-03-27 11:37 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-03-27 11:37:39 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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


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