| <?xml version="1.0" encoding="UTF-8"?> | |
| <!-- | |
| Licensed to the Apache Software Foundation (ASF) under one | |
| or more contributor license agreements. See the NOTICE file | |
| distributed with this work for additional information | |
| regarding copyright ownership. The ASF licenses this file | |
| to you under the Apache License, Version 2.0 (the | |
| "License"); you may not use this file except in compliance | |
| with the License. You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 | |
| Unless required by applicable law or agreed to in writing, | |
| software distributed under the License is distributed on an | |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
| KIND, either express or implied. See the License for the | |
| specific language governing permissions and limitations | |
| under the License. | |
| --> | |
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| <modelVersion>4.0.0</modelVersion> | |
| <parent> | |
| <groupId>org.apache.iotdb</groupId> | |
| <artifactId>iotdb-parent</artifactId> | |
| <version>1.3.7-SNAPSHOT</version> | |
| </parent> | |
| <artifactId>iotdb-code-coverage</artifactId> | |
| <packaging>pom</packaging> | |
| <name>IoTDB: Code-Coverage</name> | |
| <build> | |
| <plugins> | |
| <plugin> | |
| <groupId>org.codehaus.mojo</groupId> | |
| <artifactId>exec-maven-plugin</artifactId> | |
| <executions> | |
| <execution> | |
| <id>make-cmake-executable</id> | |
| <goals> | |
| <goal>exec</goal> | |
| </goals> | |
| <phase>process-resources</phase> | |
| <configuration> | |
| <basedir>${project.basedir}</basedir> | |
| <executable>chmod</executable> | |
| <arguments> | |
| <argument>+x</argument> | |
| <argument>copy-code-coverage-sources.sh</argument> | |
| </arguments> | |
| </configuration> | |
| </execution> | |
| <execution> | |
| <id>collect-code-coverage-results</id> | |
| <goals> | |
| <goal>exec</goal> | |
| </goals> | |
| <phase>post-integration-test</phase> | |
| <configuration> | |
| <executable>${project.basedir}/copy-code-coverage-sources.sh</executable> | |
| </configuration> | |
| </execution> | |
| </executions> | |
| </plugin> | |
| <plugin> | |
| <groupId>org.jacoco</groupId> | |
| <artifactId>jacoco-maven-plugin</artifactId> | |
| <configuration> | |
| <excludes> | |
| <exclude>org/apache/iotdb/service/sync/thrift/*</exclude> | |
| <exclude>org/apache/iotdb/service/rpc/thrift/*</exclude> | |
| <exclude>org/apache/iotdb/cluster/rpc/thrift/*</exclude> | |
| <exclude>org/apache/iotdb/protocol/influxdb/rpc/thrift/*</exclude> | |
| <exclude>org/apache/iotdb/db/qp/sql/*</exclude> | |
| </excludes> | |
| <rules> | |
| <rule implementation="org.jacoco.maven.RuleConfiguration"> | |
| <element>BUNDLE</element> | |
| <limits> | |
| <!-- Cover methodes >=30%. (the plugin does not support | |
| ignore getter and setter and toString etc..) --> | |
| <limit implementation="org.jacoco.report.check.Limit"> | |
| <counter>METHOD</counter> | |
| <value>COVEREDRATIO</value> | |
| <minimum>0.00</minimum> | |
| </limit> | |
| <!-- if-else, swtich etc.. >=70% --> | |
| <limit implementation="org.jacoco.report.check.Limit"> | |
| <counter>BRANCH</counter> | |
| <value>COVEREDRATIO</value> | |
| <minimum>0.00</minimum> | |
| </limit> | |
| <!-- class files >=95% --> | |
| <limit implementation="org.jacoco.report.check.Limit"> | |
| <counter>CLASS</counter> | |
| <value>COVEREDRATIO</value> | |
| <minimum>0.00</minimum> | |
| </limit> | |
| </limits> | |
| </rule> | |
| </rules> | |
| </configuration> | |
| <executions> | |
| <!-- see https://natritmeyer.com/howto/reporting-aggregated-unit-and-integration-test-coverage-with-jacoco/--> | |
| <execution> | |
| <id>merge-unit-and-integration-final</id> | |
| <goals> | |
| <goal>merge</goal> | |
| </goals> | |
| <phase>post-integration-test</phase> | |
| <configuration> | |
| <fileSets> | |
| <fileSet> | |
| <directory>${project.build.directory}/</directory> | |
| <includes> | |
| <include>*.exec</include> | |
| </includes> | |
| </fileSet> | |
| </fileSets> | |
| <destFile>${project.build.directory}/merged.exec</destFile> | |
| </configuration> | |
| </execution> | |
| <execution> | |
| <id>create-merged-report-final</id> | |
| <goals> | |
| <goal>report</goal> | |
| <goal>check</goal> | |
| </goals> | |
| <phase>post-integration-test</phase> | |
| <configuration> | |
| <dataFile>${project.build.directory}/merged.exec</dataFile> | |
| <outputDirectory>${project.build.directory}/jacoco-merged-reports</outputDirectory> | |
| </configuration> | |
| </execution> | |
| </executions> | |
| </plugin> | |
| </plugins> | |
| </build> | |
| </project> |