Skip to content

jdsp includes unnecessary junit-platform-surefire-provider dependency, breaking Maven Surefire execution #93

@dkaukov

Description

@dkaukov

jdsp:3.1.0 pulls in org.junit.platform:junit-platform-surefire-provider as a transitive dependency. That dependency is meant for Maven’s internal use during test runs, and it causes test failures when included in regular projects.

Example error:

Caused by: java.lang.NoClassDefFoundError: org/apache/maven/surefire/report/RunModeSetter

Workaround

You can fix it by excluding the extra dependency:

<dependency>
    <groupId>com.github.psambit9791</groupId>
    <artifactId>jdsp</artifactId>
    <version>3.1.0</version>
    <exclusions>
        <exclusion>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-surefire-provider</artifactId>
        </exclusion>
    </exclusions>
</dependency>

Suggestion

That provider probably shouldn't be in the published POM. Removing it (or making it test-scoped) should fix the issue for everyone using Maven + Surefire.

Thanks — the library is super helpful otherwise!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions