How to get multiple projects sonar scan report in to single report with coverage

Hi Team,
I have java project which is having two multiple sub projects .When I try to run through devops pipeline and running in sonarqube.it is generating two different scan results.
I want the single scan report with coverage into a single report instead of getting into different files. Can it possible to bind the two coverage reports into single report to view the code coverage.

Hi,

Welcome to the community!

Share your code-formatted (``` on the line before and on the line after) pipeline config and analysis logs?

 
Ann

azurepipeline.txt (10.6 KB)

attached yaml code which we are using for sonar scanning. Please check and let me know

Hi,

From what I can see


- task: Maven@3

  displayName: 'DFF Converter build'

  inputs:

    mavenPomFile: 'DFFConverter/pom.xml'

    mavenOptions: '-Xmx3072m'

#    javaHomeOption: 'JDKVersion'

#    jdkVersionOption: '1.8'

#    jdkArchitectureOption: 'x64'

    publishJUnitResults: true

    testResultsFiles: '**/surefire-reports/TEST-*.xml'

    sonarQubeRunAnalysis: true

    goals: 'package'



- task: Maven@3

  displayName: 'DFF Build build'

  inputs:

    mavenPomFile: 'DFFSearch/pom.xml'

    mavenOptions: '-Xmx3072m'

#    javaHomeOption: 'JDKVersion'

#    jdkVersionOption: '1.8'

#    jdkArchitectureOption: 'x64'

    publishJUnitResults: true

    #testResultsFiles: '**/surefire-reports/TEST-*.xml'

    sonarQubeRunAnalysis: true

    goals: 'package'

You’re running this as two different analyses. So naturally it’s going to show up as 2 different projects.

Instead, run one analysis on the root pom/project and you should get what you’re after.

 
Ann

Hi ,
Yes we are referring two projects but we need the single scan result with coverage for those two projects (Which is referring two pom files)

Hi,

Are these two entirely independent projects? Or are the submodules of the same project. If the former, then you’re out of luck without Applications, which are a feature of Enterprise Edition($$). If the latter, then simply analyze the parent pom/project rather than the 2 sub-projects.

 
HTH,
Ann

Submodules of the same project. Which has two different pom files for each module which has no dependency on each modules.
and below is the project structure

  1. DFF project
    under DFF project we have DFF converter and DFF search which has two different submodules which has two different pom files. We implemented single azurepipeline.yml file for those modules which has already shared with you last time.In yaml code we added th sonar properties to get the sonar analysis and coverage report in single report.But we are getting two different reports.I am azurepipeline.txt (10.6 KB) sharing one module pom file for reference.We have like that another module pom file

Hi,

Again:

I guess that would look something like

But I’m not an Azure expert.

 
Ann