在将org.junit.platform.gradle.plugin
添加到构建中并从junit4迁移所有内容之后Gradle开始打破以下错误。JUnit5 Gradle插件的文件名或扩展名太长
所有运行良好的复古赛跑者,但junit5测试不是。
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':server:junitPlatformTest'.
Caused by: org.gradle.process.internal.ExecException: A problem occurred starting process 'command 'C:\Program Files\Java\jdk1.8.0_131\bin\java.exe''
...
Caused by: java.io.IOException: CreateProcess error=206, The filename or extension is too long
我需要以某种方式配置junit5测试消费者应对这种事情呢?或者也许有一些超级jar处理这些?
EDIT1
我怀疑这可能是类路径,即时通讯将产生所有的JUnit模块的uberjar。
EDIT2
展望源代码看起来像Junit的插件添加加载到classpath
// Note: the user's test runtime classpath must come first; otherwise, code
// instrumented by Clover in JUnit's build will be shadowed by JARs pulled in
// via the junitPlatform configuration... leading to zero code coverage for
// the respective modules.
classpath = project.sourceSets.test.runtimeClasspath + project.configurations.junitPlatform
林好奇,如果我可以在项目结束后消灭这个配置junitPlatform
评估为无论如何,所有JUnit依赖关系都会被添加到代码编译中,然后该插件只是在顶部添加负载。我创建了一个将所有Junit5库包装在一个artefact中的项目。
EDIT3
我没有管理的所有木星的文物打包成1缩小CP一点,但仍然是我的classpath越过35K这是一个有点怪异
如何那么gradle是否会运行junit5测试呢?似乎是它把所有其他相关项目的所有传递,并添加他们的CP,然后刹车错误= 206