I have the following pom to create an aggregated jacoco report. I want to exclude some class files since those files do not want to get considered. Pls, let me know how to do it.
---------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8"?> <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> <groupId>wso2</groupId> <artifactId>code-coverage-report</artifactId> <packaging>pom</packaging> <version>1.0-SNAPSHOT</version> <build> <directory>${project.basedir}/target</directory> </build> <profiles> <profile> <id>with-tests</id> <activation> <property> <name>!maven.test.skip</name> </property> </activation> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> <id>copy-jacoco-dependencies</id> <phase>compile</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <outputDirectory>${project.build.directory}</outputDirectory> <includeTypes>jar</includeTypes> <includeArtifactIds>org.jacoco.ant</includeArtifactIds> <stripVersion>true</stripVersion> </configuration> </execution> </executions> </plugin> <!-- Ant plugin - Merge Jacoco Reports --> <!-- Logging and distribution modules are not checked since not relevant --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <version>1.8</version> <executions> <execution> <phase>package</phase> <goals> <goal>run</goal> </goals> <configuration> <target xmlns:jacoco="antlib:org.jacoco.ant"> <taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml"> <classpath path="${project.build.directory}"/> </taskdef> <jacoco:merge destfile="merged.exec"> <fileset dir="jacoco/exec/" includes="*.exec"/> </jacoco:merge> <jacoco:report> <executiondata> <file file="merged.exec"/> </executiondata> <structure name="Final Coverage Report"> <classfiles> <fileset dir="jacoco/class/classes/"/> </classfiles> <excludes> **/org/xxx/carbon/dataservices/ui/stub/admin/*, **/org/xxx/carbon/rest/api/stub/types/aaa/*, **/org/xxx/carbon/endpoint/stub/types/aaa/*, </excludes> </structure> <html destdir="jacoco/tmp_report"/> <xml destfile="jacoco/tmp_report/coverage-report.xml"/> <csv destfile="jacoco/tmp_report/coverage-report.csv"/> </jacoco:report> </target> </configuration> </execution> </executions> <dependencies> <dependency> <groupId>org.jacoco</groupId> <artifactId>org.jacoco.ant</artifactId> <version>${jacoco.version}</version> </dependency> </dependencies> </plugin> </plugins> </build> </profile> </profiles> <dependencies> <dependency> <groupId>org.jacoco</groupId> <artifactId>org.jacoco.ant</artifactId> <version>${jacoco.version}</version> <scope>test</scope> </dependency> </dependencies> <properties> <jacoco.version>0.7.9</jacoco.version> </properties> </project> -- You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/2f3e8ad9-e6e6-44db-a49e-85f2e8903a31%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
