How to integrate scoverage report into maven:site?

563 views
Skip to first unread message

Christoph Dittberner

unread,
Jun 5, 2014, 1:28:02 PM6/5/14
to scala-code-c...@googlegroups.com
Hi,

I added a patch to build scovergae data in a multi module pom which Sam already integrated. Thanks.

Now that I have the coverage data for all projects I wonder how to integrate the report into a maven site report? It looks like the "original" scct plugin did have the maven-report plugin "maven-scct-multiproject-report".

But what is the proper way using scoverage?

best regards

Chris

Stephen Samuel

unread,
Jun 9, 2014, 3:02:25 PM6/9/14
to scala-code-c...@googlegroups.com
I don't know much about the site maven plugin, what is it supposed to do?

Roch Delsalle

unread,
Jun 9, 2014, 5:55:27 PM6/9/14
to Stephen Samuel, scala-code-c...@googlegroups.com
It's a maven plugin that builds a small website with pretty much every information it has on the project : Javadocs / test coverage reports
Not sure how to get coverage results included tho.. 

Cobertura / JaCoCo results can be included but they don't say if it's line level coverage only :



I'll have a look after Scaladays if it's not urgent


--
Scoverage, Scala code coverage tool
Github : https://github.com/scoverage
Discussion : https://groups.google.com/group/scala-code-coverage-tool
---
You received this message because you are subscribed to the Google Groups "Scala code coverage tool" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-code-coverag...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Christoph Dittberner

unread,
Jun 11, 2014, 5:56:44 AM6/11/14
to scala-code-c...@googlegroups.com, s...@sksamuel.com
I've found a woraround by attaching the maven-scoverage-plugin to pahes pre-site and in phase site copying the generated data into the site directory. The only thing I'm missing so far is that there is no report for the parent pom which aggregates over all modules.

Example to include scoverage html data into site dir :

<plugin>
    <groupId>org.scoverage</groupId>
    <artifactId>maven-scoverage-plugin</artifactId>
    <version>${scoverage-maven-plugin-version}</version>
    <executions>
        <execution>
            <phase>pre-site</phase>
            <goals>
                <goal>report</goal>
            </goals>
        </execution>
    </executions>
</plugin>

<plugin>
    <artifactId>maven-resources-plugin</artifactId>
    <executions>
        <execution>
            <id>copy-scoverage-data</id>
            <phase>site</phase>
            <goals>
                <goal>copy-resources</goal>
            </goals>
            <configuration>
                <outputDirectory>${scoverage-doc-site}</outputDirectory>
                <resources>
                    <resource>
                        <directory>${scoverage-project-report-dir}</directory>
                        <includes>
                            <include>**/*</include>
                        </includes>
                    </resource>
                </resources>
            </configuration>
        </execution>
    </executions>
</plugin>

patric...@redbookconnect.com

unread,
Nov 6, 2014, 6:10:44 PM11/6/14
to scala-code-c...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages