How to include only the extensions I need in sonar setup

SonarQube Community version: Community Edition Version 7.3 (build 15553)

Sonar Ant Scanner: sonarqube-ant-task-2.5.jar

I can’t seem to include only the 10-15 extensions in my sonar run…

Figured out I can run on a single extension (our company’s core my_company_core extension is the ONLY one that works), but the others error if I run for just them on cmd line with the following error: /sonar.xml:96: The base directory of the module ‘…/my_company_bom’ does not exist: /path_to_platform/platform/${ext…my_company_bom.path}

running the cmd: ant sonarcheck -Dsonar.extensions my_company_bom

What I really want to do is just put my includes into the file:

sonar.projectName=“proj name”






Any help would be appreciated…I have my assumptions, but I am unsure how to proceed.


The version of SonarQube you are using (7.3) is no longer supported. Please make sure to upgrade to at least version 7.9, which is the current Long Term Support version - or upgrade to the latest version which is 8.5 as of today.

You should then try again and if you cannot make it work, I am sure you will find support in the community!


@Daniel_Meppiel any ideas or things you can at least point me in the right direction please? I just started with this and I am handcuffed at the moment with the version I have.

@Daniel_Meppiel I have commitment within my organization to try and have it upgraded next week. I believe I just have some confusion on how to setup the configuration with all the extensions and I’m not sure how it only works for the custom core extension only on cmd line…like something to do with pathing or setup of default variables, etc.

Hi @mdt27855,

I have never seen the sonar.extensions property before, and after some digging, this seems to be coming potentially from a SAP Commerce related third party plugin.

As this parameter is completely custom and the main source of the issue, you will need to contact the maintainer of this third party plugin for support.


@Daniel_Meppiel is there something that the base project directory is expecting? I am trying to setup sonarqube to run a check on SAP Commerce Cloud (Hybris), but since it’s using a file for configuration and this is a complex setup, I was having a hard time figuring out what it was expecting. I saw that once I upgrade to a supported version, that sonarqube no longer looks at things as modules, but is more project based, is that correct?

How does SonarQube handle inclusions and exclusions in regards to what you want to evaluate? Can you direct me to the best place to understand that or a good example?

I will also update this ticket next week once we have upgraded to a supported version.



Sure, I believe you should have a look to the Narrowing the Focus documentation page .

Sorry, I do not understand the first paragraph of your message. I am not sure of what you are trying to achieve: if you are trying to scan only a specific subset of source files, look at the above link. Again, for compatibility with that third-party SAP Commerce plugin, you definitely need to contact its official maintainer.

Best regards,