Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sonar.userHome command line argument isn't used for plugin caching #2061

Open
martin-strecker-sonarsource opened this issue Jul 16, 2024 · 0 comments

Comments

@martin-strecker-sonarsource
Copy link
Contributor

martin-strecker-sonarsource commented Jul 16, 2024

sonar.userHome is

The base directory for various locations, such as the user cache. It must be located inside the user home directory.

Source

It is used by the JRE cache but it should also be used by the plugin cache:

> SonarScanner.MSBuild.exe begin /k:"test" /d:sonar.host.url="http://localhost:5080/SonarQube" /d:sonar.token="??" /d:sonar.verbose=true /d:sonar.scanner.apiBaseUrl="http://localhost:5080/" /d:sonar.userHome="E:\UserHome"

JRE cache uses E:\UserHome:

19:40:52.98  JreResolver: Resolving JRE path.
19:40:52.987  Downloading from http://localhost:5080/analysis/jres?os=windows&arch=x64...
19:40:54.007  Response received from http://localhost:5080/analysis/jres?os=windows&arch=x64...
19:40:54.033  JreResolver: Cache miss. Attempting to download JRE.
19:40:54.044  Starting the Java Runtime Environment download.
19:40:54.047  Downloading Java JRE from analysis/jres/29a1a704-026c-4c58-9b81-ae9bc0ab2961.
19:40:54.049  Downloading from http://localhost:5080/analysis/jres/29a1a704-026c-4c58-9b81-ae9bc0ab2961...
19:40:54.06  Response received from http://localhost:5080/analysis/jres/29a1a704-026c-4c58-9b81-ae9bc0ab2961...
19:40:54.066  The checksum of the downloaded file is 'd3bee954a2eabbe9ad76cdc22a1cfefb5236e7fe875bd0336320de49472ddc6f' and the expected checksum is 'd3bee954a2eabbe9ad76cdc22a1cfefb5236e7fe875bd0336320de49472ddc6f'.
19:40:54.069  Starting extracting the Java runtime environment from archive 'E:\UserHome\cache\d3bee954a2eabbe9ad76cdc22a1cfefb5236e7fe875bd0336320de49472ddc6f\OpenJDK17U-jre_x64_windows_hotspot_17.0.11_9.zip' to folder 'E:\UserHome\cache\d3bee954a2eabbe9ad76cdc22a1cfefb5236e7fe875bd0336320de49472ddc6f\2s2ldw5l.dcg'.
19:40:54.113  Moving extracted Java runtime environment from 'E:\UserHome\cache\d3bee954a2eabbe9ad76cdc22a1cfefb5236e7fe875bd0336320de49472ddc6f\2s2ldw5l.dcg' to 'E:\UserHome\cache\d3bee954a2eabbe9ad76cdc22a1cfefb5236e7fe875bd0336320de49472ddc6f\OpenJDK17U-jre_x64_windows_hotspot_17.0.11_9.zip_extracted'.
19:40:54.115  The Java runtime environment was successfully added to 'E:\UserHome\cache\d3bee954a2eabbe9ad76cdc22a1cfefb5236e7fe875bd0336320de49472ddc6f\OpenJDK17U-jre_x64_windows_hotspot_17.0.11_9.zip_extracted'.
19:40:54.116  JreResolver: Download success. JRE can be found at 'E:\UserHome\cache\d3bee954a2eabbe9ad76cdc22a1cfefb5236e7fe875bd0336320de49472ddc6f\OpenJDK17U-jre_x64_windows_hotspot_17.0.11_9.zip_extracted\jdk-17.0.11+9-jre/bin/java.exe'.
19:40:54.122  Fetching analysis configuration settings...
...
but the plugin cache not:
...
19:41:01.301  Provisioning analyzer assemblies for cs...
19:41:01.302  Installing required Roslyn analyzers...
19:41:01.304  Processing plugin: csharp version 9.29.0.95321
19:41:01.311  Cache hit: using plugin files from C:\Users\martin.strecker\AppData\Local\Temp\.sonarqube\resources\0
19:41:01.313  Processing plugin: vbnet version 9.29.0.95321
19:41:01.315  Cache hit: using plugin files from C:\Users\martin.strecker\AppData\Local\Temp\.sonarqube\resources\1
19:41:01.316  Processing plugin: securitycsharpfrontend version 10.6.0.31509
19:41:01.318  Cache hit: using plugin files from C:\Users\martin.strecker\AppData\Local\Temp\.sonarqube\resources\2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants