Sonar analysing Maven 3 and multi language project using JENKINS

前端 未结 2 756
失恋的感觉
失恋的感觉 2021-01-16 16:03

Here is a problem/issue found while using Sonar in a Maven 3 Java JS project using JENKINS

相关标签:
2条回答
  • 2021-01-16 16:35

    I hope I can help you by pointing out to you the first paragraph of this documentation:

    It sais "...Therefore, for a multi-language project, the property usually has to be overridden to: sonar.sources=src. Note that this property can only be set in the pom file. It's not possible to set it via the command line."

    http://docs.codehaus.org/display/SONAR/Analyzing+with+Maven#AnalyzingwithMaven-AnalyzingaMulti-languageProject

    Good Luck!

    0 讨论(0)
  • 2021-01-16 16:37

    If you want dependency analysis then indeed the only way it to use Maven plugin to do analysis.

    If you want to be able to override default Maven source directories using the property sonar.sources from command line then you should watch/vote for this ticket: https://jira.codehaus.org/browse/MSONAR-70

    Note that starting from SonarQube Maven Plugin 2.3 we are using internally sonar-runner API so overriding properties from command line may work in your situation (as it seems you have a single module project). But no guaranty until MSONAR-70 is properly fixed.

    0 讨论(0)
提交回复
热议问题