Git Product home page Git Product logo

scoverage-maven-plugin's People

Contributors

0xroch avatar allenn avatar andreisilviudragnea avatar chetanmeh avatar ckipp01 avatar dalbani avatar deanchen avatar dependabot[bot] avatar gslowikowski avatar hereisharish avatar jamesbloomer avatar jhkuperus avatar jozic avatar jqno avatar kitbellew avatar munk avatar rigoford avatar samantmaharaj avatar siddhuwarrier avatar sksamuel avatar sujeet avatar sullis avatar sumeetgajjar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scoverage-maven-plugin's Issues

Not getting coverage reports on classes used from another project

I have a multi module project that is structured kind of like:

/ client
   / data
/ model
   /data 
/ server
   /data
   /tests

Where the client and model dont 'have any tests, but are tested all via the server project. In this scenario, scoverage shows zero coverage of any of the data classes in the client or model, even though they are used in the server. The server shows coverage. This wildly skews my coverage report. Are there any solutions?

Unable to run scoverage goal(s) in multi-module project with inter-module dependencies

Hi,

I am trying to execute a scoverage goal directly, e.g. mvn scoverate:integration-report (scoverage is not attached to a specific phase of the lifecycle), but it's impossible to do so on a reactor with modules that have cross-dependencies. The reason seems to be that in the forked process, the reactor dependencies appear to be absent.

On the other hand, if scoverage is attached to maven's lifecycle, tests are always run twice, at least with scalatest, which is very time consuming for us. A possible workaround for us, would be to execute maven clean install -DskipTests=true on the aggregator pom first and then mvn scoverate:integration-report on it. However, this is dangerous to be performed on any environment in general as SNAPSHOT artifacts will end up in maven's cache which could lead to difficult to track bugs etc.

Since i understand that the reactor issue is probably not easy to solve, may i suggest ignoring the flag -DskipTests=true so one could use scoverage attached to the maven lifecycle but without running the tests twice?

Allow Scala binary (short form) version as Scala version

Short form (2.10, 2.11 or 2.12) will be allowed as scalaVersion configuration parameter value.

E.g. both 2.11 and 2.11.8 will be accepted and mapped to scalac-scoverage-plugin_2.11 and scalac-scoverage-runtime_2.11 artifacts used internally.

excludedPackages doesn't alter percent coverage reported

I've been trying to exclude code from packages that don't contain business logic (domain entities, etc). However, the percentage of coverage never varies regardless how many packages I exclude. Am I setting the configuration incorrectly? Below is my plugin setting from my POM:

            <plugin>
                <groupId>org.scoverage</groupId>
                <artifactId>scoverage-maven-plugin</artifactId>
                <version>${scoverage.plugin.version}</version>
                <configuration>
                    <highlighting>true</highlighting>
                    <minimumCoverage>50</minimumCoverage>
                    <failOnMinimumCoverage>true</failOnMinimumCoverage>
                    <scalaVersion>${scala.version}</scalaVersion>
                     <!--Exclude packages that don't contain business logic-->
                    <excludedPackages>com.nextera.fim.ventus.controller.*;com.nextera.fim.ventus.search.*;com.nextera.fim.ventus.domain.*;com.nextera.fim.ventus.views.*</excludedPackages>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal> <!-- or integration-check -->
                        </goals>
                        <phase>prepare-package</phase> <!-- or any other phase -->
                    </execution>
                </executions>
            </plugin>

My build fails due to inadequate code coverage and the percentage covered reported never varies:

[INFO] 
[INFO] <<< scoverage-maven-plugin:1.1.0:check (default-cli) @ ventus <<<
[INFO] 
[INFO] --- scoverage-maven-plugin:1.1.0:check (default-cli) @ ventus ---
[ERROR] [scoverage] Coverage is below minimum [1.35% < 50.00%]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.476s
[INFO] Finished at: Tue Nov 24 10:53:42 EST 2015
[INFO] Final Memory: 27M/329M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.scoverage:scoverage-maven-plugin:1.1.0:check (default-cli) on project ventus: Coverage minimum was not reached -> [Help 1]

Instrumentation runs on very compile

Hi

The plugin is great but is there a way to have the instrumentation only added on test? It seems to run on mvn compile not just mvn test.

Spotted the other issue here and have tried to force to the test phase but with no luck.

Cheers

RIchard

scoverage:integration-report fails if JARs are not present in local repository

Hello,

(This looks like a duplicate of #51)

When running mvn scoverage:integration-report on a multi-module project with dependencies between modules, build fails if the modules JARs are not present in local repository (~/.m2/repository).

If I run mvn install before, it works.

I have reproduced the issue based on the scoverage-maven-samples repository (subproject aggregation), by just adding a dependency between module02 and module01 (see module02/pom.xml). The error I got when running mvn scoverage:integration-report is :

...
[INFO] ------------------------------------------------------------------------
[INFO] Building SCoverage Maven Samples : Aggregation : Module 2 1.3.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> scoverage-maven-plugin:1.3.0:integration-report (default-cli) > [scoverage]verify @ module02 >>>
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] SCoverage Maven Samples : Aggregation .............. SUCCESS [  0.552 s]
[INFO] SCoverage Maven Samples : Aggregation : Module 1 ... SUCCESS [  4.324 s]
[INFO] SCoverage Maven Samples : Aggregation : Module 2 ... FAILURE [  0.022 s]
[INFO] SCoverage Maven Samples : Aggregation : Module 3 ... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.263 s
[INFO] Finished at: 2018-02-21T12:25:35+01:00
[INFO] Final Memory: 19M/305M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project module02: Could not resolve dependencies for project org.scoverage.scoverage-maven-samples.aggregation:module02:jar:1.3.1-SNAPSHOT: Could not find artifact org.scoverage.scoverage-maven-samples.aggregation:module01:jar:1.3.1-SNAPSHOT

The issue comes from the verify phase on module02 run in forked scoverage lifecycle.

How can I avoid doing a mvn install before using coverage goals ? Is there any reason that integration-report goal uses JARs in local repository instead of classes/JARs generated in modules target/ directory ? Maybe I'm missing something.

Failed to execute goal org.scoverage:scoverage-maven-plugin:1.1.1:report (coverage) on project simpleScala: An error has occurred in SCoverage report generation:

Failed to execute goal org.scoverage:scoverage-maven-plugin:1.1.1:report (coverage) on project simpleScala: An error has occurred in SCoverage report generation: Report generation exception: No source root found for '/Users/f9lz/Local/src/Scala-Testing-CodeCoverage/src/main/scala/com/example/Dog.scala' (source roots: '/Users/f9lz/Local/src/Scala-Testing-CodeCoverage/src/main/java/') -> [Help 1]

This is my plugin in the pom file:

net.alchim31.maven scala-maven-plugin 3.2.0 compile testCompile false src/main/java src/main/scala src/test/java src/test/scala -Xms64m -Xmx1024m

Why isnt the scoverage able to find my source directory?

Coverage checking causes tests to run twice

I'd like to check the minimum test coverage level in the mvn verify step of my build. I followed the instructions on the webpage: https://github.com/scoverage/scoverage-maven-plugin#checking-minimum-test-coverage-level

This works fine, but it also causes our tests (and scala-fmt) to run twice, which is very annoying and time-consuming.

In scoverage/scoverage-maven-samples#2 you say it's better to split the call to maven into two separate ones, for example mvn clean verify -DskipTests and mvn scoverage:check, which also works I suppose, but is also very unsatisfying: team members will have to learn to use Maven in a non-standward way if they want to verify their work before submitting it to the CI server. (Either having to remember both incantations and having to remember to type both, or having to use a shell script and remembering not to use Maven directly.)

In the mean time, JaCoCo can do coverage level checking directly from mvn verify without running the tests twice, so our team members are very much used to only having to type mvn verify or mvn install to execute all of the checks that the CI server also executes.

Would it be possible to add this behavior to scoverage-maven-plugin as well? It would make Scala adoption on our team so much easier.

Add 'package' mojo for Scoverage-instrumented artifacts generation

Having artifact containing classes instrumented by Scoverage allows e.g. measuring test coverage performed outside of the Maven build.

It's possible now to generate it by using scoverage:integration-check or scoverage:integration-report mojos. It's not documented, but artifact file in target directory containing scoverage- prefix contains instrumented classes.

When using packaging assembling all runtime dependencies, like war you will find, that scalac-scoverage-runtime dependency required by instrumented classes is not present. This is because it is added with provided scope now. It has to be changed to default (compile) scope.

Scoverage-instrumented classes reference project's target/scoverage-data directory (for every module in multimodule build) using absolute paths. They cannot be run/tested on different system, or at least, system not containing this directory (directories in multimodule build).

Multiple Source Folders Yield scoverage:report errors

Hello.

I am seeing an error in a project:

An error has occurred in SCoverage report generation: Report generation exception: No source root found for 'D:\repos\project\src\main\scala\Calculators\Calculator.scala' (source roots: 'D:\repos\project\src\main\java') -> [Help 1]

The issue appears to be that the project is organized with two source roots - one for the Java code (root/src/main/java) and one for the Scala code (root/src/main/scala). The scoverage internal data is generated (we have scoverage-classes and scoverage-data w/ seemingly valid data). My reporting plugin looks like this:

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.scoverage</groupId>
                <artifactId>scoverage-maven-plugin</artifactId>
                <version>${scoverage.plugin.version}</version>
                <configuration>
                    <aggregate>true</aggregate>
                </configuration>

                <reportSets>
                    <reportSet>
                        <reports>
                            <report>report-only</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>

Where the following values are set in 'properties':

    <scoverage.plugin.version>1.3.0</scoverage.plugin.version>
    <scoverage.aggregate>true</scoverage.aggregate>

Coverage for integration tests

Hi. Is it possible to run scoverage for tests run in maven's integration test phase? This could be done separately from unit tests. Regards.

Could not find goal 'test' in version 1.3.0

<scoverage.version>1.3.0</scoverage.version>
<scala.version>2.11.8</scala.version>
<plugin>
   <groupId>org.scoverage</groupId>
   <artifactId>scoverage-maven-plugin</artifactId>
   <version>${scoverage.version}</version>
   <configuration>
      <scalaVersion>${scala.version}</scalaVersion>
   </configuration>
</plugin>

After that mvn scoverage:test returns the following message:

Could not find goal 'test' in plugin org.scoverage:scoverage-maven-plugin:1.1.1 among available goals check, check-only, help, integration-check, integration-report, post-compile, pre-compile, report, report-only

When I check my local maven repo both version 1.1.1 and 1.3.0 is there.
When I execute mvn scoverage:help it shows the following:

--- scoverage-maven-plugin:1.3.0:help (default-cli) @ my-api ---
SCoverage Maven Plugin 1.3.0
SCoverage Maven Plugin

This plugin has 12 goals:

...... omitted for length reasons :)

scoverage:test
Executes forked scoverage life cycle up to test phase.

In forked scoverage life cycle project is compiled with SCoverage
instrumentation and unit tests are executed.

Is there anything I'm missing?

Add source encoding support

Version 1.2.0 of scalac-scoverage-plugin adds source encoding support.

In Maven the convention is to specify source encoding as project property

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

This plugin's new encoding configuration parameter will use this property as default value.
If no encoding is specified, platform encoding will be used (not recommended, see https://maven.apache.org/general.html#encoding-warning).

scoverage and pax exam

Hello,
your project seems very promising, congrats! However, it seems to me that not all types of tests are handled. How about the integration tests in pax exam env, how could these be supported by scoverage?

Thank you

scoverage + specs2?

My project is current using specs2 for unit test and functional test.
I was looking for a tool to report coverage and found Scoverage.

After some initial try, now I'm wondering if scoverage would work upon specs2.
Thus I created a test project as below:
https://github.com/StarWindMoonCloud/scoverage-specs2-test

It's saying "Cannot perform check, instrumentation not performed" when run "mvn scoverage:check", why's that, does it mean scoverage + specs2 won't work?
If that is the case, do you have other recommendation?

risestoke-lm:scoverage-specs2-test qili$ mvn scoverage:check
[INFO]
[INFO] --- maven-specs2-plugin:0.4.2:run-specs (test) @ scoverage-spec2-test ---
[INFO] com.qili.SampleTest:
test input
[INFO] Success: 1 Error: 0 Failure: 0 Skipped: 0
[INFO]
[INFO] <<< scoverage-maven-plugin:1.0.1:check (default-cli) < [scoverage]test @ scoverage-spec2-test <<<
[INFO]
[INFO] --- scoverage-maven-plugin:1.0.1:check (default-cli) @ scoverage-spec2-test ---
[INFO] Cannot perform check, instrumentation not performed - skipping
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS

mvn -v
Apache Maven 3.2.3 (33f8c3e1027c3ddde99d3cdebad2656a31e8fdf4; 2014-08-12T04:58:10+08:00)
Maven home: /usr/local/apache-maven
Java version: 1.8.0_25, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.9.5", arch: "x86_64", family: "mac"

Option to turn on instrumentation

Is there a way to enable instrumentation only if a particular option or goal is executed? I'd rather not have my production code instrumented but only have instrumentation in my CI environment before running tests.

How to resolve scoverage-maven-plugin:1.1.0-SNAPSHOT Skipping SCoverage report generation

Hi
I am trying to integrate scoverage with maven but am getting SCoverage report generation info in logger

These are the steps that i followed :

  1. Integrate configuration in xml file
    pom.xml
<plugin>
                <groupId>org.scoverage</groupId>
                <artifactId>scoverage-maven-plugin</artifactId>
                <version>${scoverage.plugin.version}</version>
                <executions>
                    <execution>
                        <id>coverage</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <excludedFiles>.*Object</excludedFiles>
                </configuration>
            </plugin>
  1. run mvn scoverage:report

I don't know this configuration is right or not. Please guide me how can i make this working.

Thanks

Support for cleaner POM entries for excludePackages?

Hello,

Was wondering if it would be possible to support the following style for the excludeFiles/excludePackages configuration:

<excludedPackages>
    com.myproj.some.pkg;
    com.myproj.some.other.pkg;
    com.myproj.Main
</excludedPackages>

In my opinion this is much more readable and manageable as this list grows.

Any attempt to use this format currently fails because the newline and tab characters seem to be read as part of the class/package name and thus result in the class not being found.

Cheers!

The Coverage mojo always looks for coverage report in target/classes

Hi,

First off, thanks for this awesome plugin. It made my day! 😄

Steps to reproduce

  • Set the -P:scoverage:dataDir: arg to /tmp
  • Run mvn test followed by mvn scoverage:report

** Expected Behaviour **

  • Code coverage reports generated

Actual behaviour:

  • the Mojo fails because it looks for the measurement and coverage files in project.getBuild.getOutputDirectory

Run instrumented jar

Hi

I would like to do verification tests using robot framework on a jar aritfact and get the coverage.
I have produced instrumented jar by scoverage:package.
The scoverage-*.jar file is in target directory and I am able to start it, but i cannot get the report file (scoverage.xml). The instrumented file needs to have scoverage-data dir is that a proper behavior if I'm dealing with jar file?
Can you please share documentation how to generate report from such external execution?

scala-scoverage-plugin 1.2.0

User class threw exception: java.io.FileNotFoundException: /Users/fechen/Repo/xxxx/spark-nrt/target/scoverage.measurements.25 (No such file or directory)

HI Team

when i run my spark job with scoverage plugin added, i got below exception:
2018-07-11 01:25:37 INFO ApplicationMaster:54 - ApplicationAttemptId: appattempt_1530585518188_0009_000002
2018-07-11 01:25:37 INFO ApplicationMaster:54 - Starting the user application in a separate Thread
2018-07-11 01:25:37 INFO ApplicationMaster:54 - Waiting for spark context initialization...
2018-07-11 01:25:37 ERROR ApplicationMaster:91 - User class threw exception: java.io.FileNotFoundException: /Users/fechen/Repo/xxx/spark-nrt/target/scoverage-data/scoverage.measurements.25 (No such file or directory)
java.io.FileNotFoundException: /Users/fechen/Repo/xxx/spark-nrt/target/scoverage-data/scoverage.measurements.25 (No such file or directory)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.(FileOutputStream.java:213)
at java.io.FileWriter.(FileWriter.java:107)
at scoverage.Invoker$$anonfun$1.apply(Invoker.scala:42)
at scoverage.Invoker$$anonfun$1.apply(Invoker.scala:42)
at scala.collection.concurrent.TrieMap.getOrElseUpdate(TrieMap.scala:901)
at scoverage.Invoker$.invoked(Invoker.scala:42)
at com.xxx.sink.DedupeAndSink$.main(DedupeAndSink.scala:30)
at com.xxx.DedupeAndSink.main(DedupeAndSink.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.spark.deploy.yarn.ApplicationMaster$$anon$4.run(ApplicationMaster.scala:706)
2018-07-11 01:25:37 INFO ApplicationMaster:54 - Final app status: FAILED, exitCode: 13, (reason: User class threw exception: java.io.FileNotFoundException: /Users/fechen/Repo/xxx/spark-nrt/target/scoverage-data/scoverage.measurements.25 (No such file or directory)

Can you please help out?

Add 'test' and 'integration-test' mojos

There are two cases in multimodule projects, when two Maven runs are required to get proper coverage data:

  • when there are separate modules for integration tests:
+- foo
|  \- src
|     +- main
|     |  \- scala
|     \- test
|        \- scala   <-- `foo` unit tests
\- foo-tests
   \- src
      \- test
         \- scala   <-- `foo` integration tests
  • when one module depends on other and its tests execute not only its code, but dependent module(s) code too:
+- foo
|  \- src
|     +- main
|     |  \- scala
|     \- test
|        \- scala  <-- `foo` unit tests
\- bar             <-- `bar` depends on `foo`
   \- src
      +- main
      |  \- scala
      \- test
         \- scala  <-- `bar` unit tests executed on `foo` and `bar` code

The problem is that Scoverage report for foo module is generated before foo-tests/bar (see above) module tests execution. While these tests are executed (on instrumented foo and foo-tests/bar code) coverage level can increase.

To get proper coverage data two Maven executions must be performed:

  • first one instrumenting classes and executing tests
  • second one generating coverage report or checking coverage minimum level.

The second execution will use scoverage:report-only and/or scoverage:check-only mojos.

What mojos should be used in the first execution? There is no mojo performing tests, without generating coverage report and checking minimum coverage level.
scoverage:report must be used, which after tests execution generates coverage report. This report will be overwritten by scoverage:report-only mojo executed in the second Maven execution.

To avoid this two new mojos will be introduced:

  • scoverage:test - instruments code and executes unit tests without coverage report generation and minimum level checking,
  • scoverage:integration-test - instruments code and executes unit and integration tests without coverage report generation and level checking,

These mojos are equivalent to scoverage:report and scoverage:integration-report without coverage report generation (or scoverage:check and scoverage:integration-check without coverage level checking).
They should be used in first Maven execution in the cases described above.

Side note - the following equations are true(*):

  • scoverage:test + scoverage:report-only = scoverage:report
  • scoverage:integration-test + scoverage:report-only = scoverage:integration-report
  • scoverage:test + scoverage:check-only = scoverage:check
  • scoverage:integration-test + scoverage:check-only = scoverage:integration-check
  • scoverage:test + scoverage:check-only + scoverage:report-only = scoverage:check + scoverage:report-only = scoverage:report + scoverage:check-only

(*) if project adds source root dynamically (e.g. using build-helper-maven-plugin add-source, sbt-compiler-maven-plugin addScalaSources or scala-maven-plugin add-source mojo) this mojo must be executed before scoverage:report-only mojo. This means executing:

SomeFileName.scala.html : File Not Found

The generated Package report files (bootcamp.marsrover.html in this case) are pointing to the wrong location(Absolute instead of relative).

<a href="/home/addnab/projects/bootcamp/src/main/scala/bootcamp/scrabble/Block.scala.html">

It should be:-

<a href="./home/addnab/projects/bootcamp/src/main/scala/bootcamp/scrabble/Block.scala.html">

screenshot from 2014-12-22 12 54 48

scoverage during runtime?

Hi, I've used scoverage, now I run my jar in production. Here is a stacktrace

ava.lang.NoClassDefFoundError: scoverage/Invoker$
    at my.app.scalding.job.MyScaldingJob$.<init>(MyScaldingJob.scala:59)
    at my.app.scalding.job.MyScaldingJob$.<clinit>(MyScaldingJob.scala)
    at my.app.scalding.job.MyScaldingJob.mobPrefixDictParam(MyScaldingJob.scala)
    at my.app.scalding.job.MyScaldingJob$mobPrefixDictParam.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
    at my.app.scalding.job.Main.prepareJobJson(Main.groovy:24)
    at my.app.scalding.job.Main.main(Main.groovy:16)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:495)
    at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:50)
    at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:417)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:332)
    at org.apache.hadoop.mapred.Child$4.run(Child.java:268)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:396)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1438)
    at org.apache.hadoop.mapred.Child.main(Child.java:262)
Caused by: java.lang.ClassNotFoundException: scoverage.Invoker$
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    ... 22 more

what it could be?

Make it possible for integration tests to be able to contribute code coverage to multiple modules

Add feature similar to JaCoCo:
https://github.com/jacoco/jacoco/wiki/MavenMultiModule

Integration tests might contribute code coverage to multiple modules

Scenario:
I have multimodule project. I want to write an integration test in module A that calls a method XXX of some class from this module. This method in its turn calls a method YYY from some class in another module B.
As a result of scoverage:report I want to see that coverage for both XXX and YYY is not empty.
However currently YYY is shown as not covered

Scoverage Not genereted

Hi,

I am having issues with my project as scoverage is not getting generated. I have attached the log of mvn test scoverage:report -X with maven version being 3.2.5.

Can you please help with this? Please rename the file to .txt.

Thanks,

Jayesh
scala_log

Plugin is not generating report

[INFO]
[INFO] <<< scoverage-maven-plugin:1.1.0:integration-report (default-cli) < [scoverage]verify @ myapp-rest <<<
[INFO]
[INFO] --- scoverage-maven-plugin:1.1.0:integration-report (default-cli) @ myapp ---
[INFO] Skipping SCoverage report generation
[INFO]
[INFO] --- scoverage-maven-plugin:1.1.0:report-only (default-cli) @ myapp ---
[INFO] Skipping SCoverage report generation

It keeps on skipping report generation. I tried version 1.1.1 and 1.1.0. Both exhibit same behavior.

maven command line:
clean -X scoverage:integration-report scoverage:report-only

It does instrument classes. I see following directories under target dir:
scoverage-classes
scoverage-classes.timestamp
scoverage-myapp.jar
scoverage-myapp.jar.original

but no reports directory

Connection Timeout Issue

When running Scoverage on a Jenkins build node at work, the build constantly fails on a Connection timed out error.

My scoverage Maven entry looks like the following:

        <plugin>
            <groupId>org.scoverage</groupId>
            <artifactId>scoverage-maven-plugin</artifactId>
            <version>1.1.1</version>
            <configuration>
                <scalaVersion>2.10.4</scalaVersion>
                <aggregate>true</aggregate>
                <highlighting>true</highlighting>
            </configuration>
            <executions>
                <execution>
                    <id>packageReport</id>
                    <phase>package</phase>
                    <goals>
                        <goal>report</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

For reference, here is the error I see when running maven with -X. Any ideas?

java.net.ConnectException: Connection timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:649)
at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:173)
at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:275)
at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:371)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1103)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:997)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1511)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1439)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:646)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1300)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:1267)
at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:263)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch(XMLDocumentScannerImpl.java:1164)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(XMLDocumentScannerImpl.java:1050)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:964)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:333)
at scala.xml.factory.XMLLoader$class.loadXML(XMLLoader.scala:40)
at scala.xml.XML$.loadXML(XML.scala:57)
at scala.xml.factory.XMLLoader$class.loadFile(XMLLoader.scala:47)
at scala.xml.XML$.loadFile(XML.scala:57)
at org.scoverage.plugin.SCoverageReportMojo.generateAggregatedReports(SCoverageReportMojo.java:434)
at org.scoverage.plugin.SCoverageReportMojo.canGenerateReport(SCoverageReportMojo.java:266)
at org.scoverage.plugin.SCoverageReportMojo.execute(SCoverageReportMojo.java:347)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
at org.jvnet.hudson.maven3.launcher.Maven31Launcher.main(Maven31Launcher.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
at jenkins.maven3.agent.Maven31Main.launch(Maven31Main.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:134)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:69)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:328)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Scala version not set doesn't fail the build

When running scoverage:check, I assume it will actually work. If scala.version isn't set, it silently passes and only logs a

WARN Scala version not set

Furthermore, minimum coverage doesn't work in this situation to fail the build either.

This is not a good behavior for a build system. If I am running scoverage:check, I expect either coverage results, or a build failure. Not a build success.

Please change the default behavior or add a configuration property to fail the build if scala.version is unset.

How to invoke the plugin during 'package' or 'test' phase ?

Hi,

I am experimenting with the scoverage-plugin for the spark-solr project to get better coverage analysis of our scala code base.

Currently our jacoco coverage reports are generated during the package phase (E.g., mvn clean package -P coverage) and I would like to generate the scoverage reports during the package phase too. However, I could not figure out how to invoke scoverage plugin during the package phase.

Is it possible to do so? Do you have any suggestions ?

The scoverage-plugin integration: https://github.com/lucidworks/spark-solr/blob/master/pom.xml#L115

Thanks,
Kiran.

scoverage:report failed by [ERROR] java.security.cert.CertificateException: No name matching raw.githubusercontent.com found

@team- Jenkins maven build is failing with scoverage:report, Can you please clarify why it is happening....if i remove scoverage:report from build command list, it's successfully building.

  • I'm using Below command for build
    mvn clean package findbugs:findbugs cobertura:cobertura checkstyle:checkstyle scoverage:check scoverage:report sonar:sonar
  • Below is some of pom file config
    pom.docx
  • Debug trace
    [ERROR] java.security.cert.CertificateException: No name matching raw.githubusercontent.com found javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No name matching raw.githubusercontent.com found at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949) at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302) at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296) at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1509) at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216) at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979) at sun.security.ssl.Handshaker.process_record(Handshaker.java:914) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387) at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185) at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1513) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254) at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:647) at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1305) at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:1271) at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:263) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch(XMLDocumentScannerImpl.java:1167) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(XMLDocumentScannerImpl.java:1050) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:964) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:327) at scala.xml.factory.XMLLoader$class.loadXML(XMLLoader.scala:40) at scala.xml.XML$.loadXML(XML.scala:57) at scala.xml.factory.XMLLoader$class.loadFile(XMLLoader.scala:47) at scala.xml.XML$.loadFile(XML.scala:57) at org.scoverage.plugin.SCoverageReportMojo.generateAggregatedReports(SCoverageReportMojo.java:434) at org.scoverage.plugin.SCoverageReportMojo.canGenerateReport(SCoverageReportMojo.java:266) at org.scoverage.plugin.SCoverageReportMojo.execute(SCoverageReportMojo.java:347) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155) at org.jvnet.hudson.maven3.launcher.Maven32Launcher.main(Maven32Launcher.java:132) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238) at jenkins.maven3.agent.Maven32Main.launch(Maven32Main.java:186) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at hudson.maven.Maven3Builder.call(Maven3Builder.java:136) at hudson.maven.Maven3Builder.call(Maven3Builder.java:71) at hudson.remoting.UserRequest.perform(UserRequest.java:153) at hudson.remoting.UserRequest.perform(UserRequest.java:50) at hudson.remoting.Request$2.run(Request.java:332) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.security.cert.CertificateException: No name matching raw.githubusercontent.com found at sun.security.util.HostnameChecker.matchDNS(HostnameChecker.java:221) at sun.security.util.HostnameChecker.match(HostnameChecker.java:95) at sun.security.ssl.X509TrustManagerImpl.checkIdentity(X509TrustManagerImpl.java:455) at sun.security.ssl.X509TrustManagerImpl.checkIdentity(X509TrustManagerImpl.java:436) at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:200) at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124) at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1491) ... 66 more

Better separation of forked "scoverage" lifecycle from regular cycle in multimodule projects

  1. Mojos executed in forked "scoverage" lifecycle should never use "classes" directories or artifact files generated by current module or dependent modules in default lifecycle.
  2. After exiting forked "scoverage" lifecycle, current module and dependent modules original configurations (output directories and artifact files) should be restored, output directories used in forked lifecycle ("scoverage-classes") and module artifact files generated in forked cycle ("scoverage-${finalName}.jar") can never be used after exiting forked lifecycle.

Coverage % is different in local and remote CI

Hello,

Am using scoverage-maven-plugin. Code coverage is coming 20% when i ran local but getting only 4% when ran it on remote CI. Pointing to same code base in both places.

<scoverage.plugin.version>1.3.0</scoverage.plugin.version>

minimumCoverage does not work.

We are using scoverage maven plugin and have 70% coverage. I wanted the build to fail if the coverage if coverage goes < 70.

I have this

org.scoverage scoverage-maven-plugin ${scoverage.plugin.version} 80 true ${scala.version} true

To test this setting, i have minimumCoverage set to 80. But the build passes even if the coverage is at 72. It should have failed.

scoverage-report not exists

I get the following error when i try to run publish scoverage XML and HTML report :
Publishing Scoverage XML and HTML report ...
ERROR: Step ‘Publish Scoverage Report’ aborted due to exception:
java.io.IOException: ....\workspace\target\scala\scoverage-report not exists
at org.jenkinsci.plugins.scoverage.ScoveragePublisher.copyReport(ScoveragePublisher.java:114)
at org.jenkinsci.plugins.scoverage.ScoveragePublisher.perform(ScoveragePublisher.java:66)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720)
at hudson.model.Build$BuildExecution.post2(Build.java:185)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665)
at hudson.model.Run.execute(Run.java:1766)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Finished: FAILURE

I followed the steps as given in : https://wiki.jenkins-ci.org/display/JENKINS/Scoverage+Plugin

Separate integration test from unit test coverage

Hi,

Not really an issue, more of a feature request. The current integration-check and integration-report goals run both unit and integration tests. It would be very useful to be able to be able to report coverage based on analysis of integration tests only.

Thanks

Martin

scoverage in igonres path to dataDir

 <plugin>
                    <groupId>net.alchim31.maven</groupId>
                    <artifactId>scala-maven-plugin</artifactId>
                    <version>${maven.plugin.scala.version}</version>
                    <configuration>
                        <jvmArgs>
                            <jvmArg>-Xms64m</jvmArg>
                            <jvmArg>-Xmx1024m</jvmArg>
                        </jvmArgs>
                    </configuration>
                    <executions>
                        <execution>
                            <id>compile</id>
                            <goals>
                                <goal>add-source</goal>
                                <goal>compile</goal>
                            </goals>
                            <configuration>
                                <compilerPlugins>
                                    <compilerPlugin>
                                        <groupId>org.scoverage</groupId>
                                        <artifactId>scalac-scoverage-plugin_2.10</artifactId> <!-- ${scala.short} 2.11 -->
                                        <version>${scoverage.version}</version>
                                    </compilerPlugin>
                                </compilerPlugins>
                                <args>
                                    <arg>-g:vars</arg>
                                    <arg>-Yrangepos</arg>
                                    <arg>-P:scoverage:dataDir:${project.build.outputDirectory}</arg> <!--project.build.directory -->
                                </args>
                            </configuration>
                        </execution>
                        <execution>
                            <id>test</id>
                            <goals>
                                <goal>add-source</goal>
                                <goal>testCompile</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

scoverage:dataDir is ignored. I've changed it to :${project.build.outputDirectory}
I suppose it's because of
https://github.com/scoverage/maven-scoverage-plugin/blob/master/src/main/scala/org/scoverage/maven/ReportMojo.scala

val classesDir = new File(project.getBuild.getOutputDirectory)

Write aggregate report throw exception: java.nio.charset.MalformedInputException: Input length = 1

Hi, The commit #29 has fixed file encoding issus in writing single report, but it is not fixed writing aggreagte report scenario. Below is the error stack when I use it in a mutiple module project and set aggregate to true

[ERROR] Input length = 1
java.nio.charset.MalformedInputException: Input length = 1
at java.nio.charset.CoderResult.throwException(CoderResult.java:277)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:338)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177)
at java.io.InputStreamReader.read(InputStreamReader.java:184)
at java.io.BufferedReader.fill(BufferedReader.java:154)
at java.io.BufferedReader.read(BufferedReader.java:175)
at scala.io.BufferedSource$$anonfun$iter$1$$anonfun$apply$mcI$sp$1.apply$mcI$sp(BufferedSource.scala:38)
at scala.io.Codec.wrap(Codec.scala:68)
at scala.io.BufferedSource$$anonfun$iter$1.apply(BufferedSource.scala:38)
at scala.io.BufferedSource$$anonfun$iter$1.apply(BufferedSource.scala:38)
at scala.collection.Iterator$$anon$9.next(Iterator.scala:162)
at scala.collection.Iterator$$anon$17.hasNext(Iterator.scala:511)
at scala.collection.Iterator$$anon$11.hasNext(Iterator.scala:327)
at scala.io.Source.hasNext(Source.scala:226)
at scala.collection.Iterator$class.foreach(Iterator.scala:727)
at scala.io.Source.foreach(Source.scala:178)
at scala.collection.TraversableOnce$class.addString(TraversableOnce.scala:320)
at scala.io.Source.addString(Source.scala:178)
at scala.collection.TraversableOnce$class.mkString(TraversableOnce.scala:286)
at scala.io.Source.mkString(Source.scala:178)
at scala.collection.TraversableOnce$class.mkString(TraversableOnce.scala:288)
at scala.io.Source.mkString(Source.scala:178)
at scala.collection.TraversableOnce$class.mkString(TraversableOnce.scala:290)
at scala.io.Source.mkString(Source.scala:178)
at scoverage.report.CodeGrid.source(CodeGrid.scala:80)
at scoverage.report.CodeGrid.(CodeGrid.scala:22)
at scoverage.report.ScoverageHtmlWriter.filePage(ScoverageHtmlWriter.scala:84)
at scoverage.report.ScoverageHtmlWriter.scoverage$report$ScoverageHtmlWriter$$writeFile(ScoverageHtmlWriter.scala:50)
at scoverage.report.ScoverageHtmlWriter$$anonfun$scoverage$report$ScoverageHtmlWriter$$writePackage$1.apply(ScoverageHtmlWriter.scala:43)
at scoverage.report.ScoverageHtmlWriter$$anonfun$scoverage$report$ScoverageHtmlWriter$$writePackage$1.apply(ScoverageHtmlWriter.scala:43)
at scala.collection.immutable.List.foreach(List.scala:318)
at scoverage.report.ScoverageHtmlWriter.scoverage$report$ScoverageHtmlWriter$$writePackage(ScoverageHtmlWriter.scala:43)
at scoverage.report.ScoverageHtmlWriter$$anonfun$write$1.apply(ScoverageHtmlWriter.scala:33)
at scoverage.report.ScoverageHtmlWriter$$anonfun$write$1.apply(ScoverageHtmlWriter.scala:33)
at scala.collection.immutable.List.foreach(List.scala:318)
at scoverage.report.ScoverageHtmlWriter.write(ScoverageHtmlWriter.scala:33)
at org.scoverage.plugin.SCoverageReportMojo.generateAggregatedReports(SCoverageReportMojo.java:502)
at org.scoverage.plugin.SCoverageReportMojo.generate(SCoverageReportMojo.java:221)
at org.scoverage.plugin.SCoverageReportMojo.execute(SCoverageReportMojo.java:371)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.

Error during site generation

Having updated the scoverage-samples project to use scoverage-maven-plugin version 1.0.0 according to the documentation in GitHub, i.e. in build:

<plugin>
  <groupId>org.scoverage</groupId>
  <artifactId>scoverage-maven-plugin</artifactId>
  <version>1.0.0</version>
  <configuration>
    <minimumCoverage>80</minimumCoverage>
    <failOnMinimumCoverage>false</failOnMinimumCoverage>
  </configuration>
  <executions>
    <execution>
      <goals>
        <goal>check</goal>
      </goals>
      <phase>test</phase>
    </execution>
  </executions>
</plugin>

and in reporting:

<plugin>
  <groupId>org.scoverage</groupId>
  <artifactId>scoverage-maven-plugin</artifactId>
  <version>1.0.0</version>
  <reportSets>
    <reportSet>
      <reports>
        <report>report-only</report>
      </reports>
    </reportSet>
  </reportSets>
</plugin>

Running "mvn clean install" works fine (scoverage-maven-plugin runs and reports level of coverage). However running "mvn site" straight after results in a failure:

"[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:site (default-site) on project scoverage-samples: Error during site generation: $MY_PATH\scoverage\scoverage-samples\target\site\scoverage$MY_PATH\scoverage\scoverage-samples\src\main\scala\com\sksamuel\scoverage\samples\SimpleObject.scala.html (The filename, directory name, or volume label syntax is incorrect) -> [Help 1]"

A "target/site/scoverage/index.html" file is created but none of the links within that page work - "$MY_PATH/scoverage-samples/src/main/scala/com/sksamuel/scoverage/samples/Charmax.scala.html" does not exist.

Please advise. Thanks

1.2.0-SNAPSHOT missing files in aggregated report

Hi,

I used to use 1.1.1 against my multi module project and I wanted to get aggregated report for code coverage. However mvn clean install socoverage-report fails because of "connection timeout" error. I can get report in each module however i don't aggregated report.

Following your solution in another thread, I start using 1.2.0-snapshot against my project. now mvn build successfully and I can get the aggregated report. However I find the report does only cover one scala class/file in each package. In short, many files are not either tested or picked up by aggregator.

Could you have a look at this please?

Cheng

Tests running multiple times

This is a script generated from my console and if you see, I have tests running multiple times increasing my build time. If any of you have any idea of what is happening... kindly let me know. Attaching my pom file.
pom2.txt

[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building simpleScala 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ simpleScala ---
[INFO] Deleting /Users/f9lz/Local/src/Scala-Testing-CodeCoverage/target
[INFO]
[INFO] --- scala-maven-plugin:3.2.0:add-source (default) @ simpleScala ---
[INFO] Add Source directory: /Users/f9lz/Local/src/Scala-Testing-CodeCoverage/src/main/scala
[INFO] Add Test Source directory: /Users/f9lz/Local/src/Scala-Testing-CodeCoverage/src/test/scala
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ simpleScala ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Users/f9lz/Local/src/Scala-Testing-CodeCoverage/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ simpleScala ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 2 source files to /Users/f9lz/Local/src/Scala-Testing-CodeCoverage/target/classes
[INFO]
[INFO] --- scala-maven-plugin:3.2.0:compile (default) @ simpleScala ---
[INFO] /Users/f9lz/Local/src/Scala-Testing-CodeCoverage/src/main/java:-1: info: compiling
[INFO] /Users/f9lz/Local/src/Scala-Testing-CodeCoverage/src/main/scala:-1: info: compiling
[INFO] Compiling 5 source files to /Users/f9lz/Local/src/Scala-Testing-CodeCoverage/target/classes at 1473347844863
[INFO] prepare-compile in 0 s
[INFO] compile in 3 s
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ simpleScala ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Users/f9lz/Local/src/Scala-Testing-CodeCoverage/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ simpleScala ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 1 source file to /Users/f9lz/Local/src/Scala-Testing-CodeCoverage/target/test-classes
[INFO]
[INFO] --- scala-maven-plugin:3.2.0:testCompile (default) @ simpleScala ---
[INFO] /Users/f9lz/Local/src/Scala-Testing-CodeCoverage/src/test/java:-1: info: compiling
[INFO] /Users/f9lz/Local/src/Scala-Testing-CodeCoverage/src/test/scala:-1: info: compiling
[INFO] Compiling 5 source files to /Users/f9lz/Local/src/Scala-Testing-CodeCoverage/target/test-classes at 1473347848992
[INFO] prepare-compile in 0 s
[INFO] compile in 4 s
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ simpleScala ---
[INFO] Surefire report directory: /Users/f9lz/Local/src/Scala-Testing-CodeCoverage/target/surefire-reports


T E S T S

Running com.example.AnimalTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.235 sec
Running com.example.CatTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.014 sec
Running com.example.DogTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.012 sec
Running com.example.PigTest
()Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 sec

Results :

Tests run: 8, Failures: 0, Errors: 0, Skipped: 0

[INFO]
[INFO] --- scalatest-maven-plugin:1.0:test (test) @ simpleScala ---
�[36mDiscovery starting.�[0m
�[36mDiscovery completed in 176 milliseconds.�[0m
�[36mRun starting. Expected test count is: 3�[0m
�[32mtestNameTest:�[0m
�[32m- the name is set correctly in the constructor�[0m
�[32m- setting id�[0m
�[32m- a persons name can be changed�[0m
�[36mRun completed in 293 milliseconds.�[0m
�[36mTotal number of tests run: 3�[0m
�[36mSuites: completed 2, aborted 0�[0m
�[36mTests: succeeded 3, failed 0, canceled 0, ignored 0, pending 0�[0m
�[32mAll tests passed.�[0m
[INFO]
[INFO] >>> scoverage-maven-plugin:1.1.1:check (coverage) > [scoverage]test @ simpleScala >>>
[INFO]
[INFO] --- scala-maven-plugin:3.2.0:add-source (default) @ simpleScala ---
[INFO]
[INFO] --- scoverage-maven-plugin:1.1.1:pre-compile (coverage) @ simpleScala ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ simpleScala ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Users/f9lz/Local/src/Scala-Testing-CodeCoverage/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ simpleScala ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 2 source files to /Users/f9lz/Local/src/Scala-Testing-CodeCoverage/target/scoverage-classes
[INFO]
[INFO] --- scala-maven-plugin:3.2.0:compile (default) @ simpleScala ---
[INFO] /Users/f9lz/Local/src/Scala-Testing-CodeCoverage/src/main/java:-1: info: compiling
[INFO] /Users/f9lz/Local/src/Scala-Testing-CodeCoverage/src/main/scala:-1: info: compiling
[INFO] Compiling 5 source files to /Users/f9lz/Local/src/Scala-Testing-CodeCoverage/target/scoverage-classes at 1473347856500
[INFO] [info] Cleaning datadir [/Users/f9lz/Local/src/Scala-Testing-CodeCoverage/target/scoverage-data]
[INFO] [info] Beginning coverage instrumentation
[INFO] [info] Instrumentation completed [12 statements]
[INFO] [info] Wrote instrumentation file [/Users/f9lz/Local/src/Scala-Testing-CodeCoverage/target/scoverage-data/scoverage.coverage.xml]
[INFO] [info] Will write measurement data to [/Users/f9lz/Local/src/Scala-Testing-CodeCoverage/target/scoverage-data]
[INFO] prepare-compile in 0 s
[INFO] compile in 4 s
[INFO]
[INFO] --- scoverage-maven-plugin:1.1.1:post-compile (coverage) @ simpleScala ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ simpleScala ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Users/f9lz/Local/src/Scala-Testing-CodeCoverage/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ simpleScala ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- scala-maven-plugin:3.2.0:testCompile (default) @ simpleScala ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ simpleScala ---
[INFO] Surefire report directory: /Users/f9lz/Local/src/Scala-Testing-CodeCoverage/target/surefire-reports


T E S T S

Running com.example.AnimalTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.215 sec
Running com.example.CatTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec
Running com.example.DogTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.062 sec
Running com.example.PigTest
()Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec

Results :

Tests run: 8, Failures: 0, Errors: 0, Skipped: 0

[INFO]
[INFO] --- scalatest-maven-plugin:1.0:test (test) @ simpleScala ---
�[36mDiscovery starting.�[0m
�[36mDiscovery completed in 144 milliseconds.�[0m
�[36mRun starting. Expected test count is: 3�[0m
�[32mtestNameTest:�[0m
�[32m- the name is set correctly in the constructor�[0m
�[32m- setting id�[0m
�[32m- a persons name can be changed�[0m
�[36mRun completed in 266 milliseconds.�[0m
�[36mTotal number of tests run: 3�[0m
�[36mSuites: completed 2, aborted 0�[0m
�[36mTests: succeeded 3, failed 0, canceled 0, ignored 0, pending 0�[0m
�[32mAll tests passed.�[0m
[INFO]
[INFO] >>> scoverage-maven-plugin:1.1.1:report (coverage) > [scoverage]test @ simpleScala >>>
[INFO]
[INFO] --- scala-maven-plugin:3.2.0:add-source (default) @ simpleScala ---
[INFO]
[INFO] --- scoverage-maven-plugin:1.1.1:pre-compile (coverage) @ simpleScala ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ simpleScala ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Users/f9lz/Local/src/Scala-Testing-CodeCoverage/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ simpleScala ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 2 source files to /Users/f9lz/Local/src/Scala-Testing-CodeCoverage/target/scoverage-scoverage-classes
[INFO]
[INFO] --- scala-maven-plugin:3.2.0:compile (default) @ simpleScala ---
[INFO] /Users/f9lz/Local/src/Scala-Testing-CodeCoverage/src/main/java:-1: info: compiling
[INFO] /Users/f9lz/Local/src/Scala-Testing-CodeCoverage/src/main/scala:-1: info: compiling
[INFO] Compiling 5 source files to /Users/f9lz/Local/src/Scala-Testing-CodeCoverage/target/scoverage-scoverage-classes at 1473347863298
[INFO] [info] Cleaning datadir [/Users/f9lz/Local/src/Scala-Testing-CodeCoverage/target/scoverage-data]
[INFO] [info] Beginning coverage instrumentation
[INFO] [info] Instrumentation completed [12 statements]
[INFO] [info] Wrote instrumentation file [/Users/f9lz/Local/src/Scala-Testing-CodeCoverage/target/scoverage-data/scoverage.coverage.xml]
[INFO] [info] Will write measurement data to [/Users/f9lz/Local/src/Scala-Testing-CodeCoverage/target/scoverage-data]
[INFO] prepare-compile in 0 s
[INFO] compile in 5 s
[INFO]
[INFO] --- scoverage-maven-plugin:1.1.1:post-compile (coverage) @ simpleScala ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ simpleScala ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Users/f9lz/Local/src/Scala-Testing-CodeCoverage/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ simpleScala ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- scala-maven-plugin:3.2.0:testCompile (default) @ simpleScala ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ simpleScala ---
[INFO] Surefire report directory: /Users/f9lz/Local/src/Scala-Testing-CodeCoverage/target/surefire-reports


T E S T S

Running com.example.AnimalTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.236 sec
Running com.example.CatTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 sec
Running com.example.DogTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.058 sec
Running com.example.PigTest
()Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 sec

Results :

Tests run: 8, Failures: 0, Errors: 0, Skipped: 0

[INFO]
[INFO] --- scalatest-maven-plugin:1.0:test (test) @ simpleScala ---
�[36mDiscovery starting.�[0m
�[36mDiscovery completed in 158 milliseconds.�[0m
�[36mRun starting. Expected test count is: 3�[0m
�[32mtestNameTest:�[0m
�[32m- the name is set correctly in the constructor�[0m
�[32m- setting id�[0m
�[32m- a persons name can be changed�[0m
�[36mRun completed in 283 milliseconds.�[0m
�[36mTotal number of tests run: 3�[0m
�[36mSuites: completed 2, aborted 0�[0m
�[36mTests: succeeded 3, failed 0, canceled 0, ignored 0, pending 0�[0m
�[32mAll tests passed.�[0m
[INFO]
[INFO] <<< scoverage-maven-plugin:1.1.1:report (coverage) < [scoverage]test @ simpleScala <<<
[INFO]
[INFO] --- scoverage-maven-plugin:1.1.1:report (coverage) @ simpleScala ---
[INFO] [scoverage] Generating cobertura XML report...
[INFO] [scoverage] Generating scoverage XML report...
[INFO] [scoverage] Generating scoverage HTML report...
[INFO]
[INFO] <<< scoverage-maven-plugin:1.1.1:check (coverage) < [scoverage]test @ simpleScala <<<
[INFO]
[INFO] --- scoverage-maven-plugin:1.1.1:check (coverage) @ simpleScala ---
[INFO] [scoverage] All done. Coverage was [66.67%]
[INFO]
[INFO] >>> scoverage-maven-plugin:1.1.1:report (coverage) > [scoverage]test @ simpleScala >>>
[INFO]
[INFO] --- scala-maven-plugin:3.2.0:add-source (default) @ simpleScala ---
[INFO]
[INFO] --- scoverage-maven-plugin:1.1.1:pre-compile (coverage) @ simpleScala ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ simpleScala ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Users/f9lz/Local/src/Scala-Testing-CodeCoverage/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ simpleScala ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- scala-maven-plugin:3.2.0:compile (default) @ simpleScala ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- scoverage-maven-plugin:1.1.1:post-compile (coverage) @ simpleScala ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ simpleScala ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Users/f9lz/Local/src/Scala-Testing-CodeCoverage/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ simpleScala ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- scala-maven-plugin:3.2.0:testCompile (default) @ simpleScala ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ simpleScala ---
[INFO] Skipping execution of surefire because it has already been run for this configuration
[INFO]
[INFO] --- scalatest-maven-plugin:1.0:test (test) @ simpleScala ---
�[36mDiscovery starting.�[0m
�[36mDiscovery completed in 150 milliseconds.�[0m
�[36mRun starting. Expected test count is: 3�[0m
�[32mtestNameTest:�[0m
�[32m- the name is set correctly in the constructor�[0m
�[32m- setting id�[0m
�[32m- a persons name can be changed�[0m
�[36mRun completed in 288 milliseconds.�[0m
�[36mTotal number of tests run: 3�[0m
�[36mSuites: completed 2, aborted 0�[0m
�[36mTests: succeeded 3, failed 0, canceled 0, ignored 0, pending 0�[0m
�[32mAll tests passed.�[0m
[INFO]
[INFO] >>> scoverage-maven-plugin:1.1.1:check (coverage) > [scoverage]test @ simpleScala >>>
[INFO]
[INFO] --- scala-maven-plugin:3.2.0:add-source (default) @ simpleScala ---
[INFO]
[INFO] --- scoverage-maven-plugin:1.1.1:pre-compile (coverage) @ simpleScala ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ simpleScala ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Users/f9lz/Local/src/Scala-Testing-CodeCoverage/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ simpleScala ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- scala-maven-plugin:3.2.0:compile (default) @ simpleScala ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- scoverage-maven-plugin:1.1.1:post-compile (coverage) @ simpleScala ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ simpleScala ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Users/f9lz/Local/src/Scala-Testing-CodeCoverage/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ simpleScala ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- scala-maven-plugin:3.2.0:testCompile (default) @ simpleScala ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ simpleScala ---
[INFO] Skipping execution of surefire because it has already been run for this configuration
[INFO]
[INFO] --- scalatest-maven-plugin:1.0:test (test) @ simpleScala ---
�[36mDiscovery starting.�[0m
�[36mDiscovery completed in 145 milliseconds.�[0m
�[36mRun starting. Expected test count is: 3�[0m
�[32mtestNameTest:�[0m
�[32m- the name is set correctly in the constructor�[0m
�[32m- setting id�[0m
�[32m- a persons name can be changed�[0m
�[36mRun completed in 273 milliseconds.�[0m
�[36mTotal number of tests run: 3�[0m
�[36mSuites: completed 2, aborted 0�[0m
�[36mTests: succeeded 3, failed 0, canceled 0, ignored 0, pending 0�[0m
�[32mAll tests passed.�[0m
[INFO]
[INFO] <<< scoverage-maven-plugin:1.1.1:check (coverage) < [scoverage]test @ simpleScala <<<
[INFO]
[INFO] --- scoverage-maven-plugin:1.1.1:check (coverage) @ simpleScala ---
[INFO] [scoverage] All done. Coverage was [66.67%]
[INFO]
[INFO] <<< scoverage-maven-plugin:1.1.1:report (coverage) < [scoverage]test @ simpleScala <<<
[INFO]
[INFO] --- scoverage-maven-plugin:1.1.1:report (coverage) @ simpleScala ---
[INFO] [scoverage] Generating cobertura XML report...
[INFO] [scoverage] Generating scoverage XML report...
[INFO] [scoverage] Generating scoverage HTML report...
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ simpleScala ---
[INFO] Building jar: /Users/f9lz/Local/src/Scala-Testing-CodeCoverage/target/simpleScala-0.0.1-SNAPSHOT.jar
[INFO]
[INFO] --- pitest-maven:1.1.4:mutationCoverage (check) @ simpleScala ---
[INFO] Found plugin : Default csv report plugin
[INFO] Found plugin : Default xml report plugin
[INFO] Found plugin : Default html report plugin
[INFO] Found plugin : Default limit mutations plugin
[INFO] Found shared classpath plugin : Default mutation engine
10:17:54 AM PIT >> INFO : Mutating from /Users/f9lz/Local/src/Scala-Testing-CodeCoverage/target/classes
10:17:55 AM PIT >> INFO : Verbose logging is disabled. If you encounter an problem please enable it before reporting an issue.
10:17:55 AM PIT >> INFO : SLAVE : objc[21584]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be
10:17:55 AM PIT >> INFO : SLAVE : used. Which one is undefined.

10:17:55 AM PIT >> INFO : Sending 5 test classes to slave
10:17:55 AM PIT >> INFO : Sent tests to slave
10:17:55 AM PIT >> INFO : SLAVE : 10:17:55 AM PIT >> INFO : Found 8 tests

10:17:55 AM PIT >> INFO : SLAVE : 10:17:55 AM PIT >> INFO : Dependency analysis reduced number of potential tests by 0

10:17:55 AM PIT >> INFO : SLAVE : 10:17:55 AM PIT >> INFO : 8 tests received

�/�-�\�|�/�-�\�|10:17:56 AM PIT >> INFO : Calculated coverage in 1 seconds.
10:17:56 AM PIT >> INFO : Created 5 mutation test units
stderr : objc[21585]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be stderr : used. Which one is undefined.
stderr : objc[21586]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be stderr : used. Which one is undefined.
�/�-stderr : objc[21587]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be stderr : used. Which one is undefined.
�\stderr : objc[21588]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be stderr : used. Which one is undefined.
�|stderr : objc[21589]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be stderr : used. Which one is undefined.

�/10:18:01 AM PIT >> INFO : Completed in 6 seconds

- Timings

scan classpath : < 1 second
coverage and dependency analysis : 1 seconds
build mutation tests : < 1 second

run mutation analysis : 4 seconds

Total : 6 seconds

- Statistics

Generated 13 mutations Killed 11 (85%)

Ran 18 tests (1.38 tests per mutation)

- Mutators

org.pitest.mutationtest.engine.gregor.mutators.ConditionalsBoundaryMutator
Generated 1 Killed 0 (0%)
KILLED 0 SURVIVED 1 TIMED_OUT 0 NON_VIABLE 0
MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0

NO_COVERAGE 0

org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator
Generated 1 Killed 1 (100%)
KILLED 1 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0
MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0

NO_COVERAGE 0

org.pitest.mutationtest.engine.gregor.mutators.ReturnValsMutator
Generated 9 Killed 8 (89%)
KILLED 8 SURVIVED 1 TIMED_OUT 0 NON_VIABLE 0
MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0

NO_COVERAGE 0

org.pitest.mutationtest.engine.gregor.mutators.MathMutator
Generated 1 Killed 1 (100%)
KILLED 1 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0
MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0

NO_COVERAGE 0

org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator
Generated 1 Killed 1 (100%)
KILLED 1 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0
MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0

NO_COVERAGE 0

[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ simpleScala ---
[INFO] Installing /Users/f9lz/Local/src/Scala-Testing-CodeCoverage/target/simpleScala-0.0.1-SNAPSHOT.jar to /Users/f9lz/.m2/repository/123/simpleScala/0.0.1-SNAPSHOT/simpleScala-0.0.1-SNAPSHOT.jar
[INFO] Installing /Users/f9lz/Local/src/Scala-Testing-CodeCoverage/pom.xml to /Users/f9lz/.m2/repository/123/simpleScala/0.0.1-SNAPSHOT/simpleScala-0.0.1-SNAPSHOT.pom
[INFO]
[INFO] --- pitest-maven:1.1.4:mutationCoverage (default-cli) @ simpleScala ---
[INFO] Found plugin : Default csv report plugin
[INFO] Found plugin : Default xml report plugin
[INFO] Found plugin : Default html report plugin
[INFO] Found plugin : Default limit mutations plugin
[INFO] Found shared classpath plugin : Default mutation engine
10:18:01 AM PIT >> INFO : Mutating from /Users/f9lz/Local/src/Scala-Testing-CodeCoverage/target/classes
[INFO] Defaulting to group id (123*)
10:18:01 AM PIT >> INFO : Verbose logging is disabled. If you encounter an problem please enable it before reporting an issue.
10:18:01 AM PIT >> INFO : SLAVE : objc[21590]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be
10:18:01 AM PIT >> INFO : SLAVE : used. Which one is undefined.

10:18:01 AM PIT >> INFO : Sending 0 test classes to slave
10:18:01 AM PIT >> INFO : Sent tests to slave
10:18:02 AM PIT >> INFO : SLAVE : 10:18:02 AM PIT >> INFO : Found 0 tests

10:18:02 AM PIT >> INFO : SLAVE : 10:18:02 AM PIT >> INFO : Dependency analysis reduced number of potential tests by 0

10:18:02 AM PIT >> INFO : SLAVE : 10:18:02 AM PIT >> INFO : 0 tests received

10:18:02 AM PIT >> INFO : Calculated coverage in 0 seconds.
10:18:02 AM PIT >> INFO : Created 0 mutation test units
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 41.312 s
[INFO] Finished at: 2016-09-08T10:18:02-05:00
[INFO] Final Memory: 44M/422M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.pitest:pitest-maven:1.1.4:mutationCoverage (default-cli) on project simpleScala: Execution default-cli of goal org.pitest:pitest-maven:1.1.4:mutationCoverage failed: No mutations found. This probably means there is an issue with either the supplied classpath or filters.
[ERROR] See http://pitest.org for more details.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

NoClassDefFoundError: scoverage/Invoker$

I am Diyakhi trying to scovrage for code coverage for one of our multi-project using maven build tool. I followed the steps given in the https://github.com/scoverage/scoverage-maven-plugin link and used maven plugin to build scoverage instrumented classes. When try to run tests on the instrumented class, I am getting the following error.
Also, included the scalac-scoverage-plugin_2.11-1.3.0.jar as a dependency while running test as mentioned in the link #10
and still getting the scoverage/Invoker$ error.
It is much appreciated, if you have any suggestion to fix the issue.
hanks

scoverage-maven-plugin version = 1.3.0
scala version=2.11

Error mesage
Exception in thread "main" java.lang.NoClassDefFoundError: scoverage/Invoker$
at org.apache.spark.util.CommandLineUtils$class.$init$(CommandLineUtils.scala:33)
at org.apache.spark.deploy.SparkSubmit$.(SparkSubmit.scala:70)
at org.apache.spark.deploy.SparkSubmit$.(SparkSubmit.scala)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
Caused by: java.lang.ClassNotFoundException: scoverage.Invoker$
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.