Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1097148

Summary: KIE-CI does not process offline mode specified in settings.xml
Product: [Retired] JBoss BRMS Platform 6 Reporter: Marek Winkler <mwinkler>
Component: BREAssignee: Mario Fusco <mfusco>
Status: CLOSED EOL QA Contact: Marek Winkler <mwinkler>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0.1CC: dtucker, etirelli, kverlaen, rrajasek
Target Milestone: ER1   
Target Release: 6.1.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 18:35:01 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:
Attachments:
Description Flags
Maven project reproducing the problem none

Description Marek Winkler 2014-05-13 09:03:23 UTC
Description of problem:

KIE-CI does not process <offline>true</offline> specified in Maven settings.xml.

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

BRMS 6.0.2.ER2

Additional info:

Solving this issue could probably help in specific production environments, it is one possible solution for problem described in BZ 1095975.

Comment 1 Mario Fusco 2014-05-13 17:23:22 UTC
Fixed by https://github.com/droolsjbpm/drools/commit/406082727

Comment 2 Marek Winkler 2014-09-30 14:57:47 UTC
It seems that the problem persists. Please run the attached reproducer project with provided settings.xml:

1. extract the attached reproducer maven project

2. edit provided settings.xml and comment out <offline>true</offline> (to allow maven download its own plugin dependencies into its empty local repo)

 - do not worry about <server> and <repositories> declared in settings.xml - they are not needed, in fact, we expect that the artifacts used in the test are not found in any configured repository

3. run mvn clean test -Dkie.maven.settings.custom=settings.xml -s settings.xml

4. edit settings.xml again, this time enable the offline mode (i.e. remove the previous comment around <offline>true</offline>)

5. run again mvn clean test -Dkie.maven.settings.custom=settings.xml -s settings.xml

6. see the console output, which still shows Connection refused messages (instead of complaining that artifact cannot be downloaded in offline mode)

After setting a breakpoint in org.kie.scanner.embedder.MavenProjectLoader.parseMavenPom(), it seems that the created MavenRequest instance has its property offline set to false, even though MavenSettings.getSettings() in org.kie.scanner.Aether.getAether() has offline property set to true.

If I missed anything, please let me know, thanks!

Comment 3 Marek Winkler 2014-09-30 14:58:29 UTC
Created attachment 942771 [details]
Maven project reproducing the problem

Comment 4 Marek Winkler 2014-09-30 14:59:12 UTC
I have used BRMS 6.1.0.DR3 (6.2.0.Beta2-redhat-1) for verification.

Comment 5 Mario Fusco 2014-10-10 13:19:43 UTC
Fixed by https://github.com/droolsjbpm/drools/commit/be68fc779

Comment 6 Marek Winkler 2014-12-09 16:16:14 UTC
When running the reproducer with 6.1.0 ER2, it correctly recognizes the offline mode specified in Maven settings.xml.

I have logged BZ 1172220 indicating possible problem which should be investigated but it is not related to the fix.