Skip to content

'No source root found' error for module #191

Closed
@gtaylor1981

Description

@gtaylor1981

I just tried upgrading from v1.4.11 to the newest v2.0.1 and have encountered a problem.
I recreated this in a minimal project (called my-project) containing a subfolder with a single Scala module (my-module).
When I run mvn clean install it fails with the error:

No source root found for 'C:\GIT\my-project\my-module\my-module\src\main\scala\org\example\MyClass.scala'
(source roots: 'C:\GIT\my-project\my-module\src\main\scala\', 'C:\GIT\my-project\my-module\target\generated-sources\annotations\')

The module name appears twice in the path (...\my-module\my-module\...) which looks like an error to me.

The root POM is almost empty, and the module POM has the plugin configured as follows:

<plugin>
    <groupId>org.scoverage</groupId>
    <artifactId>scoverage-maven-plugin</artifactId>
    <version>2.0.1</version>
    <configuration>
        <additionalForkedProjectProperties>skipTests=false</additionalForkedProjectProperties>
        <highlighting>true</highlighting>
    </configuration>
    <executions>
        <execution>
            <id>scoverage-report</id>
            <goals>
                <goal>report</goal>
            </goals>
            <phase>package</phase>
        </execution>
    </executions>
</plugin>

I attached the project and module POM files if it helps:
project-pom.txt
module-pom.txt

I do see a scoverage-data folder created in C:\GIT\my-project\my-module\target\ as expected.
This contains the source.roots file which looks like:

C:\GIT\my-project\my-module\src\main\java
C:\GIT\my-project\my-module\src\main\scala
C:\GIT\my-project\my-module\target\generated-sources\annotations

Also in this folder is the scoverage.coverage file which contains the source path:

my-module\\src\\main\\scala\\org\\example\\MyClass.scala

This looks ok, but perhaps it is being appended to the module path (C:\GIT\my-project\my-module) which then causes the duplicated module name in the middle?

Do I need to change something in my setup, or is this a bug in the plugin?
Please let me know if I can provide any further info. And many thanks for resurrecting the plugin and releasing the new version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions