]
Edson Tirelli reassigned DROOLS-724:
------------------------------------
Assignee: Mario Fusco (was: Edson Tirelli)
Preemptive authentication in KIE Scanner
----------------------------------------
Key: DROOLS-724
URL:
https://issues.jboss.org/browse/DROOLS-724
Project: Drools
Issue Type: Bug
Components: kie server
Affects Versions: 6.1.0.Final
Reporter: Rares Vernica
Assignee: Mario Fusco
The pre-emptive authentication setting from Maven's settings.xml is not picked up by
Drools:
<server>
<id>guvnor-m2-repo</id>
<username>...</username>
<password>...</password>
<configuration>
<httpConfiguration>
<usePreemptive>true</usePreemptive>
</httpConfiguration>
</configuration>
</server>
I am not sure if the bug is in Drools or Wagon. To fix it, I made the pre-emptive always
true, but adding:
...
if ( "http".equals( roleHint ) || "https".equals(
roleHint ) ) {
HttpMethodConfiguration httpMethodConfiguration = new
HttpMethodConfiguration();
httpMethodConfiguration.setUsePreemptive( true );
HttpConfiguration httpConfiguration = new HttpConfiguration();
httpConfiguration.setAll( httpMethodConfiguration );
HttpWagon httpWagon = new HttpWagon();
httpWagon.setHttpConfiguration( httpConfiguration );
return httpWagon;
}
...
in Aether$ManualWagonProvider. This obviously is not a good solution.