pitest-junit5-plugin icon indicating copy to clipboard operation
pitest-junit5-plugin copied to clipboard

test plugin junit5 not found when dependency is declared in sub module

Open hemeroc opened this issue 6 years ago • 0 comments

Hi, I set up the structure of my project as follows:

root
├── sub1
└── sub2

PITest should only run in submodule 1 therefore the submodule 1 includes following configuration:

buildscript {
    repositories {
        mavenCentral()
    }
    configurations.maybeCreate('pitest')
    dependencies {
        classpath 'info.solidsoft.gradle.pitest:gradle-pitest-plugin:1.3.0'
        pitest 'org.pitest:pitest-junit5-plugin:0.5'
    }
}

apply plugin: "info.solidsoft.pitest"

pitest {
    pitestVersion = "1.4.0"
    testPlugin = "junit5"
    verbose = true
}

Running ./gradlew pitest or ./gradlew :sub1:pitest results in following error Message:

4:16:19 PM PIT >> FINE : MINION : org.pitest.util.PitError: Could not load requested test plugin junit5

(verbose output has to be activated to see this line!)

It seems that the pitest plugin fails setup the correct classpath. As soon as I add the pitest 'org.pitest:pitest-junit5-plugin:0.5' dependency to the build.gradle of the root project it works as expected.

I created the same issue in the szpak/gradle-pitest-plugin repository. Cause I think this is more related to the general way the pitest gradle plugin resolves plugin dependencies. Sorry for the duplication. https://github.com/szpak/gradle-pitest-plugin/issues/88

hemeroc avatar Jul 16 '18 14:07 hemeroc