Browse Source

build: Create single XML JaCoCo report

This can be uploaded to coverage services like Coveralls etc.
tags/v1.9.2
Florian Zschocke 3 years ago
parent
commit
a5cb3bda71
1 changed files with 17 additions and 2 deletions
  1. 17
    2
      build.xml

+ 17
- 2
build.xml View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="gitblit" default="compile" xmlns:mx="antlib:org.moxie">
<project name="gitblit" default="compile" xmlns:mx="antlib:org.moxie" xmlns:jacoco="antlib:org.jacoco.ant">
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -160,7 +160,22 @@
<!-- Run unit tests -->
<mx:test failonerror="true" />
<!-- Create JaCoCo single XML report file for code coverage service. -->
<jacoco:report>
<executiondata>
<file file="${project.outputDirectory}/jacoco.exec"/>
</executiondata>
<structure name="${project.name}">
<classfiles>
<fileset dir="${project.outputDirectory}/classes"/>
</classfiles>
<sourcefiles encoding="UTF-8">
<fileset dir="${project.src.dir}"/>
</sourcefiles>
</structure>
<xml destfile="${project.targetDirectory}/reports/coverage/jacoco.xml"/>
</jacoco:report>
</target>

Loading…
Cancel
Save