<legend id='nffGF'><style id='nffGF'><dir id='nffGF'><q id='nffGF'></q></dir></style></legend>

<tfoot id='nffGF'></tfoot>

      <bdo id='nffGF'></bdo><ul id='nffGF'></ul>

  1. <small id='nffGF'></small><noframes id='nffGF'>

  2. <i id='nffGF'><tr id='nffGF'><dt id='nffGF'><q id='nffGF'><span id='nffGF'><b id='nffGF'><form id='nffGF'><ins id='nffGF'></ins><ul id='nffGF'></ul><sub id='nffGF'></sub></form><legend id='nffGF'></legend><bdo id='nffGF'><pre id='nffGF'><center id='nffGF'></center></pre></bdo></b><th id='nffGF'></th></span></q></dt></tr></i><div id='nffGF'><tfoot id='nffGF'></tfoot><dl id='nffGF'><fieldset id='nffGF'></fieldset></dl></div>
    1. 为多个 java 项目设置 sonar-runner

      时间:2024-05-10
    2. <legend id='oRUCW'><style id='oRUCW'><dir id='oRUCW'><q id='oRUCW'></q></dir></style></legend>
      • <tfoot id='oRUCW'></tfoot>

          1. <small id='oRUCW'></small><noframes id='oRUCW'>

                <tbody id='oRUCW'></tbody>
                <bdo id='oRUCW'></bdo><ul id='oRUCW'></ul>

                <i id='oRUCW'><tr id='oRUCW'><dt id='oRUCW'><q id='oRUCW'><span id='oRUCW'><b id='oRUCW'><form id='oRUCW'><ins id='oRUCW'></ins><ul id='oRUCW'></ul><sub id='oRUCW'></sub></form><legend id='oRUCW'></legend><bdo id='oRUCW'><pre id='oRUCW'><center id='oRUCW'></center></pre></bdo></b><th id='oRUCW'></th></span></q></dt></tr></i><div id='oRUCW'><tfoot id='oRUCW'></tfoot><dl id='oRUCW'><fieldset id='oRUCW'></fieldset></dl></div>

                本文介绍了为多个 java 项目设置 sonar-runner的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我正在尝试运行 sonar-runner 以一次性分析多个 Java 项目.根据 documentation,这只是创建一个 <每个项目的 code>sonar-project.properties 文件.但我不清楚我必须将这些 sonar-project.properties 文件放在哪里.

                我尝试在 $SONAR_RUNNER_HOME/conf 文件夹中添加多个 .properties 文件,但跑步者似乎没有选择它们.它只看到 sonar-project.properties 文件.

                关于如何为多个项目运行 sonar-runner 有什么建议吗?

                解决方案

                其实让sonar runner分析多个项目,只要它们在同一个文件系统中,还是很简单的.只需将属性文件放在离项目不远的目录中即可.然后在此属性文件中声明您的每个项目.

                假设您在 dev/general/BasicStuff、dev/service/CoolStuff、dev/utility/UtilStuff 和 dev/display/FrameWorkStuff 中有 4 个项目.

                如 此处中所述,您可以通过方式 #2 创建一个dev 中包含该行的文件

                sonar.modules=BasicStuff,CoolStuff,UtilStuff,FrameWorkStuff

                对于每个模块",一行

                BasicStuff.sonar.projectBaseDir=general/BasicStuffCoolStuff.sonar.projectBaseDir=服务/CoolStuff

                在项目目录中,您依次创建一个包含其他所需信息的文件,例如

                sonar.projectName=BasicStuffsonar.sources=src

                如果您以顶级属性作为目标启动 sonar runner,您将获得一个全面的结果,其中显示了项目中的指标,并允许您深入了解每个项目.

                希望这就是你要找的.

                I am trying to run sonar-runner to analyze multiple Java projects in one go. According to the documentation it is just a matter of creating a sonar-project.properties file for each project. But it is not clear to me where exactly I have to put these sonar-project.properties files.

                I tried to add multiple .properties files in the $SONAR_RUNNER_HOME/conf folder but the runner does not seem to pick them up. It only sees the sonar-project.properties file.

                Any suggestions on how to run sonar-runner for multiple projects?

                解决方案

                Actually it is quite simple to let the sonar runner analyze multiple projects as long as they are in the same file system. Just put a properties file in a directory that is not to far away from the projects. Then declare each of your projects in this properties file.

                Lets assume you have 4 projects in dev/general/BasicStuff, dev/service/CoolStuff, dev/utility/UtilStuff and dev/display/FrameWorkStuff.

                As described in hereWay #2 you create a file in dev which contains the line

                sonar.modules=BasicStuff,CoolStuff,UtilStuff,FrameWorkStuff
                

                And for each of the "modules" a line like

                BasicStuff.sonar.projectBaseDir=general/BasicStuff
                CoolStuff.sonar.projectBaseDir=service/CoolStuff
                

                Inside the project directories you in turn create a file which contains the other needed information, e.g.

                sonar.projectName=BasicStuff
                sonar.sources=src
                

                If you start sonar runner with the top level properties as target you get a comprehensive result which shows metrics across the projects as well as allowing you to drill into each of them.

                Hope this was what you were looking for.

                这篇关于为多个 java 项目设置 sonar-runner的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:声纳违规:安全 - 阵列直接存储 下一篇:声纳抱怨记录并重新抛出异常

                相关文章

                <small id='DTuVX'></small><noframes id='DTuVX'>

              • <tfoot id='DTuVX'></tfoot><legend id='DTuVX'><style id='DTuVX'><dir id='DTuVX'><q id='DTuVX'></q></dir></style></legend>

              • <i id='DTuVX'><tr id='DTuVX'><dt id='DTuVX'><q id='DTuVX'><span id='DTuVX'><b id='DTuVX'><form id='DTuVX'><ins id='DTuVX'></ins><ul id='DTuVX'></ul><sub id='DTuVX'></sub></form><legend id='DTuVX'></legend><bdo id='DTuVX'><pre id='DTuVX'><center id='DTuVX'></center></pre></bdo></b><th id='DTuVX'></th></span></q></dt></tr></i><div id='DTuVX'><tfoot id='DTuVX'></tfoot><dl id='DTuVX'><fieldset id='DTuVX'></fieldset></dl></div>

                    <bdo id='DTuVX'></bdo><ul id='DTuVX'></ul>