How to generate xml report with scoverage maven plugin?

Artem Malinko

I'm trying to generate scoverage xml report to use it in Jenkins. But all I can get is the folder scoverage-classes with my .scala files. Here is a part of my pom.xml:

<build>
        <plugins>
            <plugin>
                <groupId>org.scala-tools</groupId>
                <artifactId>maven-scala-plugin</artifactId>
                <version>2.15.2</version>
                <executions>
                    <execution>
                        <id>scala-compile</id>
                        <goals>
                            <goal>compile</goal>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.scalatest</groupId>
                <artifactId>scalatest-maven-plugin</artifactId>
                <version>${scalatest.plugin.version}</version>
                <configuration>
                    <junitxml>surefire-reports</junitxml>
                    <stdout>W</stdout>
                </configuration>
                <executions>
                    <execution>
                        <id>test</id>
                        <phase>test</phase>
                        <goals>
                            <goal>test</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.scoverage</groupId>
                <artifactId>scoverage-maven-plugin</artifactId>
                <version>1.1.1</version>
                <configuration>
                    <scalaVersion>${scala.version}</scalaVersion>
                    <aggregate>true</aggregate>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>2.9</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>index</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>

            <plugin>
                <groupId>org.scoverage</groupId>
                <artifactId>scoverage-maven-plugin</artifactId>
                <version>${scoverage.plugin.version}</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>report
                            </report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>

Scalatest generates xml reports, but Scoverage does not. I've tried to run maven with different args like mvn scoverage:report, mvn scoverage:report site and so on. Nothing helps. What should I change in my pom to make it work?

Artem Malinko

It turned out that I have scala compiler plugin that is not supported by scoverage plugin. Also it looks like maven scala compiler plugin from org.scala-tools is outdated. Supported by scoverage plugins are:

  • net.alchim31.maven:scala-maven-plugin

  • com.google.code.sbt-compiler-maven-plugin:sbt-compiler-maven-plugin

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

maven jacoco plugin does not generate coverage report

From Dev

How to exclude package from scoverage in maven

From Dev

How do I generate maven-metata.xml with maven-publish and the artifactory-gradle-plugin?

From Dev

how to generate jmeter dashboard report through maven project

From Dev

How do I know which goals of a maven plugin are report goals?

From Dev

How to get the icons for the resulted maven-surefire-report-plugin

From Dev

How to get the icons for the resulted maven-surefire-report-plugin

From Dev

How do I know which goals of a maven plugin are report goals?

From Dev

How to configure liquibase maven plugin to generate sql output for oracle

From Dev

How to generate executable scripts using spring boot maven plugin

From Dev

Maven archetype:generate plugin 3.0 how to specify remote repository

From Dev

How to generate a weekly report?

From Dev

Jasper Report Plugin Generate PDF in Grails 2.4.2

From Dev

How does Eclipse generate the Plugin Specified Entries in the XML catalog?

From Dev

How does Eclipse generate the Plugin Specified Entries in the XML catalog?

From Dev

Generate rebel.xml in the root of jar module with jrebel-maven-plugin

From Dev

How to Generate Web.xml flle on maven project

From Dev

Cobertura-report generation with maven plugin

From Dev

Cobertura-report generation with maven plugin

From Dev

maven surefire report plugin not running the test cases

From Dev

How to configure "tomcat7-maven-plugin" in pom.xml?

From Dev

How to migrate build with xml-maven-plugin transformation to sbt?

From Dev

How to generate report (Extent Report) in Specflow Project

From Dev

Report not being generated with Maven-Surefire-Report plugin

From Dev

How to generate html report for issues reported using sonarqube-5.4 and maven?

From Dev

How to generate a dynamic report in java

From Dev

Android maven plugin to generate multiple dex files

From Dev

How to generate only one single XML result with jasmine-report and protractor

From Dev

How to use hibernate4-maven-plugin to generate multiple dialects schemas?

Related Related

  1. 1

    maven jacoco plugin does not generate coverage report

  2. 2

    How to exclude package from scoverage in maven

  3. 3

    How do I generate maven-metata.xml with maven-publish and the artifactory-gradle-plugin?

  4. 4

    how to generate jmeter dashboard report through maven project

  5. 5

    How do I know which goals of a maven plugin are report goals?

  6. 6

    How to get the icons for the resulted maven-surefire-report-plugin

  7. 7

    How to get the icons for the resulted maven-surefire-report-plugin

  8. 8

    How do I know which goals of a maven plugin are report goals?

  9. 9

    How to configure liquibase maven plugin to generate sql output for oracle

  10. 10

    How to generate executable scripts using spring boot maven plugin

  11. 11

    Maven archetype:generate plugin 3.0 how to specify remote repository

  12. 12

    How to generate a weekly report?

  13. 13

    Jasper Report Plugin Generate PDF in Grails 2.4.2

  14. 14

    How does Eclipse generate the Plugin Specified Entries in the XML catalog?

  15. 15

    How does Eclipse generate the Plugin Specified Entries in the XML catalog?

  16. 16

    Generate rebel.xml in the root of jar module with jrebel-maven-plugin

  17. 17

    How to Generate Web.xml flle on maven project

  18. 18

    Cobertura-report generation with maven plugin

  19. 19

    Cobertura-report generation with maven plugin

  20. 20

    maven surefire report plugin not running the test cases

  21. 21

    How to configure "tomcat7-maven-plugin" in pom.xml?

  22. 22

    How to migrate build with xml-maven-plugin transformation to sbt?

  23. 23

    How to generate report (Extent Report) in Specflow Project

  24. 24

    Report not being generated with Maven-Surefire-Report plugin

  25. 25

    How to generate html report for issues reported using sonarqube-5.4 and maven?

  26. 26

    How to generate a dynamic report in java

  27. 27

    Android maven plugin to generate multiple dex files

  28. 28

    How to generate only one single XML result with jasmine-report and protractor

  29. 29

    How to use hibernate4-maven-plugin to generate multiple dialects schemas?

HotTag

Archive