Bug 1319046 - Unique GAV detection fails if Repository ID is used by both PluginRepository and (regular) Repository
Summary: Unique GAV detection fails if Repository ID is used by both PluginRepository ...
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ER2
: 6.3.0
Assignee: manstis
QA Contact: Jiri Locker
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-18 14:26 UTC by Tomas Livora
Modified: 2020-03-27 19:46 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-27 19:46:10 UTC
Type: Bug


Attachments (Terms of Use)
Mixed client and server log (410.13 KB, text/plain)
2016-03-18 14:26 UTC, Tomas Livora
no flags Details
settings.xml in .m2 directory (2.01 KB, text/plain)
2016-03-18 14:27 UTC, Tomas Livora
no flags Details

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


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