Mvn org.sonarsource.scanner.maven:sonar-maven-plugin change the target folder stucture

hi All
Our current github-action cicd pipeline is currently using mvn org.sonarsource.scanner.maven:sonar-maven-plugin:sonar to scan our project. After running sonar scan, I found that the target folder structure had changed.
This is the folder structure that existed before running the sonarscan:


After running sonarscan, the classes folder as well as jar files and other folders that were supposed to be in the target folder were moved outside, and target folder was removed.

could you please take a look at this issue ? thank you

Best
F.J

Hey there.

I’m not able to reproduce this – are you able to reproduce this locally outside of your Github action?

@Colin Hi, thank you for your quick response, i am not able to reproduce it in my local since it is via cicd pipeline. did i miss something?

I’m asking if you can try and reproduce it locally with this specific project, outside the context of your CI/CD pipeline.

@Colin
Yeah, i tried, same result, after i ran mvn sonarscan, it changed the folder structure.

And this only happens when you run mvn sonar:sonar, and not when you run mvn package or mvn verify (or whatever you normally do before Sonar analysis)?

I can’t reproduce this. It might help if you upload a sample project you can reproduce this issue on.

Yes, it only happens when after i run mvn sonar:sonar , the targer folder got changed then. how can i upload a sample project in here ? thank you

Best
FJ

Zipping it up and placing it here, or a public GitHub repo.