Hi,
TL;DR: running sonar on a server with company internal certificates. This obviously causes problems with the included Java version (so far so normal for Java). The problem is that the docs are not very good in this regard, and that the .net wrapper uses a different way of setting the JRE than the regular scanner, leading to a lot of confusion.
- Regarding bad docs … SonarScanner for .NET should mention where these two parameters are supposed to go. By logic (and by where they are placed in the doc) they should go to the
dotnet install
step, however they are actually supposed to go to thedotnet sonarscan begin
step (and only there, not to theend
step as well). Ideally there should be an example instead of the current very abstract way it is written. - Regarding non-standard detection: the standalone sonar-scanner simply seems to pick up on the presence of JAVA_HOME and evaluates if the java version there is valid. The .net version requires the two switches mentioned above. This behaviour should be aligned, and in my eyes the .net version should follow the regular version here, simply detecting if there is an existing Java install and use that (and only if really wanted by the user with a parameter, provision its own version).
Cheers