java.lang.NoClassDefFoundError:org/junit/jupiter/api/methodOrderContext

java.lang.NoClassDefFoundError:org/junit/jupiter/api/methodOrderContext,java,gradle,build.gradle,Java,Gradle,Build.gradle,我有一个Gradle配置,我想用它来构建一个项目并运行JUnit测试。 我使用Eclipse作为IDE plugins { id 'org.springframework.boot' version '2.0.4.RELEASE' } apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'application' apply plugin: 'war' apply plugin: 'com.gradle.build-sc

我有一个Gradle配置,我想用它来构建一个项目并运行JUnit测试。 我使用Eclipse作为IDE

plugins {
    id 'org.springframework.boot' version '2.0.4.RELEASE'
}

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'application'
apply plugin: 'war'
apply plugin: 'com.gradle.build-scan'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'org.springframework.boot'

mainClassName = 'org.datalis.admin.config.Application'

dependencyManagement {
    imports {
        mavenBom "org.springframework.boot:spring-boot-starter-parent:2.1.9.RELEASE"
    }
}

group = 'backend'
version = '1.0'
sourceCompatibility = 1.8
targetCompatibility = 1.8

repositories {
    jcenter()
    mavenCentral()
    maven { url "https://repo.spring.io/snapshot" }
  } 
}

dependencies {
    compile 'com.github.mediafire:mediafire-java-sdk:5.0.10.2'
    compile "io.jsonwebtoken:jjwt:0.9.1"
    compile group: 'org.springframework.boot', name: 'spring-boot-starter-freemarker'
    testCompile group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.5.2'
    testCompile group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.5.2'
    testCompile group: 'org.mockito', name: 'mockito-core', version: '3.1.0'
    testCompile "org.springframework.boot:spring-boot-starter-test:2.1.3.RELEASE"
    testCompile group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: '5.5.2'
    testCompile "org.springframework.restdocs:spring-restdocs-mockmvc:2.0.3.RELEASE"
    compile "org.junit.platform:junit-platform-engine:1.5.2"
    compile "org.junit.platform:junit-platform-commons:1.5.2"
    testCompile "org.junit.platform:junit-platform-launcher:1.5.2"
}

war {
    enabled=true
} 

dependencies {
    testImplementation 'org.junit.jupiter:junit-jupiter-api:5.5.2'
    testImplementation 'org.junit.jupiter:junit-jupiter:5.5.2'
    testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.5.2'
    testCompile group: 'org.junit.jupiter', name: 'junit-jupiter', version: '5.5.2'

}

test {
    useJUnitPlatform()
    testLogging {
        showStandardStreams true
    }
}   
}

但是,当我在Eclipse run
Junit test
中运行该选项时,会出现异常:

java.lang.NoClassDefFoundError: org/junit/jupiter/api/MethodOrdererContext
    at 
Caused by: java.lang.ClassNotFoundException: org.junit.jupiter.api.MethodOrdererContext
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 24 more
你知道我怎样才能解决这个问题吗?可能是Eclipse配置的问题

你能给我一些建议如何解决这个问题吗