Bug 1319046

Summary: Unique GAV detection fails if Repository ID is used by both PluginRepository and (regular) Repository
Product: [Retired] JBoss BRMS Platform 6 Reporter: Tomas Livora <tlivora>
Component: Business CentralAssignee: manstis
Status: CLOSED EOL QA Contact: Jiri Locker <jlocker>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.3.0   
Target Milestone: ER2   
Target Release: 6.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 19:46:10 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:
Attachments:
Description Flags
Mixed client and server log
none
settings.xml in .m2 directory none

Description Tomas Livora 2016-03-18 14:26:35 UTC
Created attachment 1137796 [details]
Mixed client and server log

Description of problem:
If you do not specify settings.xml file and let Business Central use the default one from your .m2 directory, you may sometimes get really strange exception when you try to create a project using REST API.

Version-Release number of selected component (if applicable):
6.3.0 ER1

Steps to Reproduce:
1. Start a fresh installation of Business Central.
2. Run ProjectTest from our test suite [1]
3. See the server log

Actual results:
IllegalStateException from HashMap

Expected results:
No exception or better exception is something is really wrong

Additional info:
I am not sure if this is the right way to use such settings.xml file. But in any case, the application should at least throw some exception that tells the user what exactly is not set up properly.


[1] https://gitlab.mw.lab.eng.bos.redhat.com/bxms/brms/blob/prod-6.3/test-kie-wb-rest/src/test/java/org/jboss/qa/brms/functional/ProjectTest.java#L34

Comment 1 Tomas Livora 2016-03-18 14:27:20 UTC
Created attachment 1137799 [details]
settings.xml in .m2 directory

Comment 2 manstis 2016-03-18 16:09:01 UTC
Hi Thomas, could you please clarify if you don't use a custom location for settings.xml the error happens; but if you *do* use a custom location for settings.xml there is no error?

For Unit Tests you can disable the feature that is checking the GAV being deployed is unique (https://issues.jboss.org/browse/BPMSPL-252) by setting the System Property "org.guvnor.project.gav.check.disabled" to "true". This of course does not resolve the issue you report, but may be useful for Unit Tests.

Comment 3 manstis 2016-03-18 16:14:15 UTC
Hi Tomas, in addition to comment #2 could you please provide the POM for the Project you was trying to build via REST?

Comment 4 manstis 2016-03-18 16:17:15 UTC
I think you have a repository defined in the Project's POM that is also in setting.xml...

Comment 5 manstis 2016-03-18 16:43:01 UTC
@Tomas, it appears the issue is that settings.xml contains two Repository definitions with the same ID "jboss-public-repository-group" - one for dependency resolution and the other for plugins, with different URLs.

Can you try changing the ID for one of them and re-try?

Comment 9 Tomas Livora 2016-03-31 13:03:38 UTC
Verified on BRMS 6.3.0 ER2