Scan the monorepo folders separately

I have 20 folders inside one project repo but I want to have 20projects with the folder name coming from the same repo.
Tried below in the property of prepare analysis task of the pipeline:
sonar.projectKey=AssementAPIPOC
** sonar.projectName=AssementAPIPOC**
** sonar.host.url=sonarurl**
** sonar.login=token value**

This is just replacing the name of the previous one and providing the current scan which vanishes the older scan

This could be because we have one key for a repo and we are using the same keys everytime as we cannot import the project n number of times with the same name and branch

Can I get a quick solution to this?

Hi,

sonar.projectKey represents the unique identifier for the project in SonarQube. So it’s expected that when you analyze different code sets using the same project key, the results replace each other. To make a unique project per folder, you’ll need to vary the project key value per folder.

 
HTH,
Ann