Sonar mit Ant und Jacoco

Kleiner codeschnipsel zum Markdown testen


<target name="sonar.ant">
    <!-- list of mandatories Sonar properties -->
    <property name="sonar.sources" value="${src.dir}" /> <!-- list of source directories separated by a comma -->

    <!-- list of optional Sonar properties -->
    <property name="sonar.binaries" value="${build.classes.dir}" /> <!--list of directories which contain for example the Java bytecode -->
    <property name="sonar.tests" value="${test.src.dir}" /> <!--list of test source directories separated by a comma -->

    <property name="sonar.dynamicAnalysis" value="reuseReports" />
    <property name="sonar.core.codeCoveragePlugin" value="jacoco" /> <!-- enable jacoco -->
    <property name="sonar.surefire.reportsPath" value="${sonar.junit.reportsPath}" />
    <property name="sonar.jacoco.reportPath" value="${sonar.jacoco.file}" /> <!-- folder/jacoco.exec -->
    <property name="sonar.java.source" value= "6"/>
    <property name="sonar.java.target" value= "6"/>

    <!-- path to libraries (optional). These libraries are for example used by the Java Findbugs plugin -->
    <path id="sonar.libraries">
      <fileset dir="${basedir}" includes="**/compile/**/*.jar" excludes="**/compile/jboss/**/*.jar"/>
    </path>

  <sonar:sonar key="readybank:${project.name}" version="${project.version}"/>
</target>

Schreibe einen Kommentar

Scroll to top