使用Ant任务时,为什么我的库没有导入Sonar?

时间:2011-04-19 10:58:21

标签: ant sonarqube

我们正在评估Sonar,我已经设置了一个Ant任务,使用here指令将项目数据导入Sonar,但我的库没有出现在库视图中。

除此之外,所有其他信息都在那里工作。

也许我误解了Ant任务中的库元素是什么?请有人能告诉我我错过了什么吗?

Screen shot of Sonar showing empty libraries view

来自我的构建文件:

    <target name="sonar">
    <sonar:sonar workDir="sonartemp" key="org.example:example" version="0.1-SNAPSHOT" xmlns:sonar="antlib:org.sonar.ant">

        <!-- source directories (required) -->
        <sources>
            <path location="src/common/src" />
            <path location="src/commonWidgets/src" />
            <path location="src/compositionWidget/src" />
            <path location="src/nativeLib/src" />
            <path location="src/services/src" />
        </sources>

        <!-- list of properties (optional) -->
        <property key="sonar.projectName" value="Test RPS Composition Import" />
        <property key="sonar.dynamicAnalysis" value="true" />

            <!-- test source directories (optional) -->
            <tests>
            <path location="src/common/test" />
            <path location="src/commonWidgets/test" />
            <path location="src/compositionWidget/test" />
            <path location="src/services/test" />
            </tests>

        <!-- binaries directories, which contain for example the compiled Java bytecode (optional) -->
        <binaries>
            <path location="src/common/build" />
            <path location="src/commonWidgets/build" />
            <path location="src/compositionWidget/build" />
            <path location="src/services/build" />
        </binaries>

        <!-- path to libraries (optional). These libraries are for example used by the Java Findbugs plugin -->
        <libraries>
            <path location="src/common/lib/**/" />
            <path location="src/commonWidgets/lib/**/" />
            <path location="src/compositionWidget/lib/**/" />
            <path location="src/services/lib/" />
        </libraries>
    </sonar:sonar>
</target>

1 个答案:

答案 0 :(得分:3)

据我所知,此视图仅适用于maven ant任务定义中的库用于静态分析工具,如findbugs。

此标签仅供参考,不需要任何内容​​。