Need your help here, I am trying to import external issues on .properties/.json resource files in Generic Issue Format during maven scan, but fail to import any, I tried either absolute file path or relative file path.
my external issue json file like below:
"message": "text: a",
my mvn scan command:
mvn -Dmaven.test.skip=true -B -f pom.xml clean install sonar:sonar -Dsonar.projectKey=demo-maven -Dsonar.projectName=demo-maven -Dsonar.sourceEncoding=utf-8 -Dsonar.externalIssuesReportPaths=maven_issues.json -X
Scan result shows the files in maven_issues.json are unknown and thus failed to import
Could you help share how we can make the import work in this case?
Thanks a lot in advance
could someone kindly help please? Thanks!
Please don’t bump threads after a day. In fact, it becomes less likely we’ll see it, as once a thread has a reply it moves off our list of “threads with no replies”.
You’ll need to make sure the scanner is aware of your src/main/resources directory, which it won’t be by default
For example, having this in your pom.xml file:
Thank you very much for the reply, I was almost giving up to get response, and didn’t releaize it’s because I was making my post off your thread list, nice remind, I now catch it.
Your solution works for me! thanks again~
however I have got a new issue, as I am analyzing a multi-module project for our client, some of their modules in scope is having no resources folder, and mvn sonar scan then reports error
.<moduleA>/src/main/resources does not exist for Maven module A, Please check the property sonar.sources
Wondering if there is a way to silently skip this error without modifying the source project? because the source project is out of our control
I guess I know how to solve my followed question, that resources not exist error. I reset the sonar.sources value to src/main, then it is ok. thanks again for your help! and I am closing this issue now.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.