Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
abdheshkumar opened this issue May 21, 2015 · 18 comments

Comments

@abdheshkumar
Copy link

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

@gslowikowski
Copy link
Member

Hi

Add

    <pluginRepositories>
        <pluginRepository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>

to your pom.xml.

@abdheshkumar
Copy link
Author

I added that you suggested but i am still getting same issue:

[INFO]
[INFO] <<< scoverage-maven-plugin:1.1.0-SNAPSHOT:report (default-cli) < [scoverage]test @ harvester <<<
[INFO]
[INFO] --- scoverage-maven-plugin:1.1.0-SNAPSHOT:report (default-cli) @ harvester ---
[INFO] Skipping SCoverage report generation
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:02 min
[INFO] Finished at: 2015-05-21T13:53:41+05:30
[INFO] Final Memory: 36M/95M

@abdheshkumar
Copy link
Author

Here is the complete pom configuration:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <properties>
        <scoverage.plugin.version>1.1.0-SNAPSHOT</scoverage.plugin.version>
    </properties>
    <pluginRepositories>
        <pluginRepository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>
    <build>
        <plugins>
            <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>

        </plugins>
    </build>
</project>
``

@gslowikowski
Copy link
Member

Does it work with version 1.0.4?

@abdheshkumar
Copy link
Author

No it doesn't work with 1.0.4 too?
Maybe i configured in wrong way. The configuration that i posted is correct? and the commend that i run is correct?

@gslowikowski
Copy link
Member

It should work with 1.0.4.
Does not work with 1.1.0-SNAPSHOT, I found a bug introduced recently. Anyway, it does not print Skipping SCoverage report generation for me. Can you attach (or send me directly, if you cannot publish it) Maven execution log with debug info ( -X option)?

@abdheshkumar
Copy link
Author

``html


4.0.0

<properties>
    <scoverage.plugin.version>1.0.4</scoverage.plugin.version>
</properties>

<build>
    <pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.scoverage</groupId>
                <artifactId>scoverage-maven-plugin</artifactId>
                <version>1.0.4</version>
            </plugin>
        </plugins>
    </pluginManagement>
    <plugins>

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

    </plugins>
</build>
<reporting>
    <plugins>
        <plugin>
            <groupId>org.scoverage</groupId>
            <artifactId>scoverage-maven-plugin</artifactId>
            <version>1.0.4</version>
        </plugin>
    </plugins>
</reporting>


Above is project pom.xml file configuration, please check that all is right configuration?
Now i am not getting Skipping SCoverage report generation error when i run mvn scoverage:report but it throwing exception [ERROR] Failed to execute goal net.alchim31.maven:scala-maven-plugin:3.1.3:compile (scala-compile-first) on project scala-scoverage-demo: Execution scala-compile-first of goal net.alchim31.maven:scala-maven-plugin:3.1.3:compile failed. NullPointerException -> [Help 1]  

When i run mvn compile it compile all files successfully. I don't know what the happening...:-(

@gslowikowski
Copy link
Member

I need execution log.

@gslowikowski
Copy link
Member

Hi
1.1.0 version was released yesterday. Try it, please.
Without sample project or your execution log I cannot reproduce the issue and will close this issue.

@abdheshkumar
Copy link
Author

Hi @gslowikowski
I am getting same issue like this scoverage/scalac-scoverage-plugin#93
and i am running on scala 2.10.

@gslowikowski
Copy link
Member

So something has changed, you had no exception before. Anyway this is not a Maven plugin issue. I still cannot help you without sample project. Tried to build your project https://github.com/abdheshkumar/sbt-poc-coverage, but it works for me.

@abdheshkumar
Copy link
Author

Yes @gslowikowski it's working fine with Scala 2.11+ but its not working 2.10 at least for me.

@gslowikowski
Copy link
Member

Ok, I'm closing, this is not Maven plugin issue.

@ryan-williams
Copy link

Just a quick drive-by to note that I was just seeing the

[INFO] Skipping SCoverage report generation

message and eventually realized it was because my POM had <packaging>pom</packaging> instead of <packaging>jar</packaging> due to a copy/paste error on my end.

@abdheshkumar
Copy link
Author

So now it would work with Scala 2.10?

@abdheshkumar
Copy link
Author

Still same issue:

[INFO] >>> scoverage-maven-plugin:1.1.1:report (default-cli) > [scoverage]test @ root >>>
[INFO]
[INFO] --- scoverage-maven-plugin:1.1.1:pre-compile (default-cli) @ root ---
[INFO] Skipping SCoverage execution for project with packaging type 'pom'

[INFO] >>> scoverage-maven-plugin:1.1.1:report (default-cli) > [scoverage]test @ common >>>
[INFO]
[INFO] --- scoverage-maven-plugin:1.1.1:pre-compile (default-cli) @ common ---
[WARNING] Skipping SCoverage execution - unsupported Scala version "2.10"

[INFO]
[INFO] <<< scoverage-maven-plugin:1.1.1:report (default-cli) < [scoverage]test @ common <<<
[INFO]
[INFO] --- scoverage-maven-plugin:1.1.1:report (default-cli) @ common ---
[INFO] Skipping SCoverage report generation
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building workflow 1.0.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> scoverage-maven-plugin:1.1.1:report (default-cli) > [scoverage]test @ workflow >>>
[INFO]
[INFO] --- scoverage-maven-plugin:1.1.1:pre-compile (default-cli) @ workflow ---
[WARNING] Skipping SCoverage execution - unsupported Scala version "2.10"
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ workflow ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.

@gslowikowski
Copy link
Member

gslowikowski commented Aug 28, 2016

@abdheshkumar
From your logs:

[WARNING] Skipping SCoverage execution - unsupported Scala version "2.10"

BTW, I cannot compile your test project with Scala 2.10.x. There is compilation error.

@kunal642
Copy link

@abdheshkumar were you able to resolve this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants