原来,gradle windows java.io.IOException: CreateProcess error=206, filename is too long是一个很好的解决方案。但是,对于 gradle 5:
CollectionUtils.join(File.pathSeparator, classpath.getFiles())
失败
unknown property 'CollectionUtils' type org.gradle.api.tasks.testing.Test
什么是适合 gradle 5.0 的修复?
至少对我来说: https://github.com/viswaramamoorthy/gradle-util-plugins/ 在 gradle 5.0 上也失败并出现相同的错误
最佳答案
您可以在 gradle buildscript 中使用外部库。
示例:
buildscript {
repositories {
mavenCentral()
}
dependencies {
// this dependency will be used in gradle build script.
classpath 'org.apache.commons:commons-lang3:3.8.1'
}
}
//and use it like this in Your tasks
org.apache.commons.lang3.StringUtils.join(configurations.testRuntime,File.pathSeparator)
我不确定这是否能解决您的问题,但您也可以尝试其他类似的库。
关于java - gradle 5 - windows java.io.IOException : CreateProcess error=206, 文件名太长,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53569601/