sonarqube scanner for msbuild: java issue when scanner is executed under a drive path (f.e.g. W:\)

302 views
Skip to first unread message

mawl

unread,
Dec 1, 2017, 8:52:45 AM12/1/17
to SonarQube
Hi,

We're using your scanner (https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+MSBuild) in a docker image and are mounting the build directory under a virtual drive called W:. (because of npm/yarn issues with container mapped directories under windows containers, see https://github.com/nodejs/node/issues/8897#issuecomment-298662512).

When executing SonarQube.Scanner.MSBuild.exe end in W:\ the java process stops with:

build	30-Nov-2017 14:09:47	C:\ProgramData\chocolatey\lib\msbuild-sonarqube-runner\tools\sonar-scanner-3.0.1.733\bin\..
error	30-Nov-2017 14:09:48	Usage: java [-options] class [args...]


It has to be fixed in line 66-68 in sonar-scanner.bat where project.home is set to %CD%, I think, because of the trailing \ in the path, wich escapes the double quotes in the arguments list: "-Dproject.home=W:\"

Regards
Marco


G. Ann Campbell

unread,
Dec 1, 2017, 12:23:10 PM12/1/17
to SonarQube
Hi Marco,

Please feel free to submit a pull request.


:-)
Ann

G. Ann Campbell

unread,
Dec 1, 2017, 2:03:38 PM12/1/17
to Marco Wlotzka, SonarQube
Hi Marco,

Please don't forget to include the Google Group in your replies.

Since you were citing line numbers I assumed you were looking at source code. You were - of the files in your installation. #facepalm



Ann




---
G. Ann Campbell | SonarSource
Product Manager
@GAnnCampbell

On Fri, Dec 1, 2017 at 1:56 PM, Marco Wlotzka <marco....@gmail.com> wrote:
Hi Ann,

For sure, but where is the github repo? :)

--
You received this message because you are subscribed to a topic in the Google Groups "SonarQube" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarqube/wi7u-CyV_tc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/f8fe4ffe-5618-4b8c-a53b-2df73db54163%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


marco....@gmail.com

unread,
Dec 5, 2017, 7:57:25 AM12/5/17
to SonarQube
Hi Ann,


Regards,

Marco
To unsubscribe from this group and all its topics, send an email to sonarqube+...@googlegroups.com.

G. Ann Campbell

unread,
Dec 6, 2017, 9:48:47 AM12/6/17
to Marco Wlotzka, SonarQube
Thanks Marco!

It looks like the Scanner team has already picked up on this.


:-)
Ann



---
G. Ann Campbell | SonarSource
Product Manager
@GAnnCampbell

To unsubscribe from this group and all its topics, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/b4510934-615e-4e72-b9cf-1dc0543e69d4%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages