sonarqube scanner downloads all the plugins
Asked Answered
F

1

12

I have a very simple sonar-scanner.properties file. This is how it looks like:

sonar.host.url=https://sonarhosturl
sonar.login=xxx
sonar.password=yyy
sonar.language=java
sonar.projectKey=someprojectkey
sonar.projectName=someprojectname
sonar.projectVersion=5.6
sonar.sources=somepath

When I run sonar-scanner, I can see in the logs that it downloads a lot of plugins. Most of them are that ones I do not need.

Here is the part of log output:

INFO: Load plugins index (done) | time=95ms
INFO: Download sonar-dev-cockpit-plugin-1.12.jar
INFO: Download sonar-cobertura-plugin-1.6.3.jar
INFO: Download sonar-css-plugin-2.2.jar
INFO: Download sonar-crowd-plugin-2.0.jar
INFO: Download sonar-pmd-plugin-2.6.jar
INFO: Download sonar-android-plugin-1.1.jar
INFO: Download sonar-pdfreport-plugin-1.5.jar
INFO: Download sonar-scm-svn-plugin-1.3.jar
INFO: Download sonar-plsql-plugin-2.8.jar
INFO: Download sonar-csharp-plugin-5.4.0.464.jar
INFO: Download sonar-java-plugin-3.14.jar
INFO: Download sonar-ldap-plugin-2.1.0.507.jar
INFO: Download sonar-web-plugin-2.5.0.476.jar
INFO: Download sonar-xml-plugin-1.4.1.jar
INFO: Download sonar-build-breaker-plugin-2.1.jar
INFO: Download sonar-checkstyle-plugin-2.4.jar
INFO: Download sonar-swift-plugin-2.1.0.1504.jar
INFO: Download sonar-cpp-plugin-4.2.jar
INFO: Download sonar-python-plugin-1.6.jar
INFO: Download sonar-issues-density-plugin-1.0.jar
INFO: Download sonar-fxcop-plugin-1.0.jar
INFO: Download sonar-clover-plugin-3.1.jar
INFO: Download sonar-motion-chart-plugin-1.7.jar
INFO: Download sonar-javascript-plugin-2.17.0.3154.jar
INFO: Download sonar-findbugs-plugin-3.3.jar
INFO: Download sonar-scm-git-plugin-1.2.jar
INFO: Download sonar-governance-plugin-1.1.jar

Is there a way I can limit the plugins it downloads? I only need Java related plugins.

Fie answered 20/11, 2017 at 18:32 Comment(6)
You could remove the plugins in SonarQube but what is the real problem?Battat
We use aws codebuild so each build happens on a new server and it takes time to download these plugins. How do I tell sonar-scanner to not download all these plugins?Fie
@Fie were you able to solved this?Jaundiced
@Jaundiced unfortunately no.Fie
It would be nice if we could at least pre-download the plug-ins.Blastula
you should try to cache them and restore the cache at each buildsEpencephalon
S
2

According to this discussion on Sonar Community, SonarCloud already allows restricting what plugins are downloaded, and they were "working to port the behavior to SonarQube 10.4".

There's also this issue, [SONAR-19996] Restriction of the download of scanner plugins to those that are essentially needed, resolved on December 21.

I found no official documentation about it though.

Swayne answered 30/1 at 0:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.