"module.sonar.property" alternatives

With new LTA 2025.1 versions, sonar.module is removed ( SONAR-17706 )

Though using sonar.module still do not cause any errors but module.sonar.property no longer works.

How should sonar.module should be replaced ?
Is keeping sonar.module and only removing perfix “module” from module.sonar.property work ?

Deprecated structure.

sonar.modules=m1,m2

m1.sonar.projectName=Module 1
m1.sonar.sources=src

m2.sonar.projectName=Module 2
m2.sonar.sources=src

Can this be replaced by

root/
├── module1/
│ └── sonar-project.properties
├── module2/
│ └── sonar-project.properties
└── sonar-project.properties (root)

Any sample projects ? Any other alternate solution ?

Hi,

As the ticket you cite says, support for modules was dropped long before 2025.1.

You shouldn’t need to explicitly specify this. Use the SonarScanner flavor that’s appropriate to your build technology, and this should be handled for you automatically.

 
HTH,
Ann

thanks for your response ann.

one more clarification

We generate gcov for every module like

sonar.cfamily.gcov.reportsPath=/workspace/M1
sonar.cfamily.gcov.reportsPath=/workspace/M2
sonar.cfamily.gcov.reportsPath=/workspace/M3

If we remove sonar.module from project.properties file.

How can we manage these coverage paths ?

Hi,

According to the docs, the GCov parameter is looking for a single path to a directory. So I suppose you’ll need to put them all in one directory, and then make sure the paths in those reports match up to what analysis is seeing. From a practical standpoint, it probably means making sure the file paths in the reports are all relative from project root.

 
HTH,
Ann