我的应用程序是一个 springboot gradle 应用程序。我的应用程序的一部分涉及使用 gradle 进行旧版 gwt 编译。它工作正常,但今天当我运行下面的 gradle 任务时,它显示 CreateProcess error=206,文件名或扩展名太长。可能出了什么问题?因为它以前有效。是否建议更改以下代码以解决此问题?
task compileGwt(dependsOn: classes, type: JavaExec) {
//ext.buildDir = "${project.buildDir}/resources/main/static"
ext.buildDir = "${project.rootDir}/src/main/webapp"
//ext.buildDir = "${project.buildDir}"
ext.extraDir = "${project.buildDir}/extra"
ext.generatedDir = "${project.buildDir}/generated"
inputs.source sourceSets.main.java.srcDirs
inputs.dir sourceSets.main.output.resourcesDir
outputs.dir buildDir
// Workaround for incremental build (GRADLE-1483)
outputs.upToDateSpec = new org.gradle.api.specs.AndSpec()
doFirst {
file(buildDir).mkdirs()
//classpath.each { println it.name}
}
main = 'com.google.gwt.dev.Compiler'
classpath {
[
sourceSets.main.java.srcDirs, // Java source
sourceSets.main.output.resourcesDir, // Generated resources
sourceSets.main.output.classesDir, // Generated classes
sourceSets.main.compileClasspath, // Deps
]
} …Run Code Online (Sandbox Code Playgroud)