Generate code coverage report with Cobertura

Change-Id: I5824d4708e61cb4386a69e33b97be4f507444b46
diff --git a/Changes b/Changes
index 1690ce5..6f9132d 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,7 @@
-0.59.3 2020-10-27
+0.59.3 2020-11-11
     - [feature] Added "missing query reference" status code (diewald)
+    - [cleanup] Added test coverage checking with
+      $ mvn cobertura:cobertura (diewald, kupietz)
 
 0.59.2 2020-07-24
     - [feature] Add fingerprint method to index (diewald)
diff --git a/pom.xml b/pom.xml
index d0e8b40..a063442 100644
--- a/pom.xml
+++ b/pom.xml
@@ -219,6 +219,14 @@
 		    <artifactId>commons-io</artifactId>
 		    <version>2.6</version>
 		</dependency>
+
+    <!-- https://mvnrepository.com/artifact/org.codehaus.mojo/cobertura-maven-plugin -->
+    <dependency>
+      <groupId>org.codehaus.mojo</groupId>
+      <artifactId>cobertura-maven-plugin</artifactId>
+      <version>2.7</version>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 
 	<build>
@@ -327,6 +335,34 @@
 					<mainClass>de.ids_mannheim.korap.server.Node</mainClass>
 				</configuration>
 			</plugin>
+
+			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>cobertura-maven-plugin</artifactId>
+				<version>2.7</version>
+				<configuration>
+					<formats>
+						<format>html</format>
+						<format>xml</format>
+					</formats>
+					<check>
+						<branchRate>70</branchRate>
+						<lineRate>70</lineRate>
+						<haltOnFailure>true</haltOnFailure>
+						<totalBranchRate>70</totalBranchRate>
+						<totalLineRate>70</totalLineRate>
+						<packageLineRate>70</packageLineRate>
+						<packageBranchRate>70</packageBranchRate>
+					</check>
+				</configuration>
+				<executions>
+					<execution>
+						<goals>
+							<goal>clean</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
 		</plugins>
 
 		<resources>