gpt4 book ai didi

linux - execCommand == null(实际上是 'null not' )

转载 作者:太空狗 更新时间:2023-10-29 11:21:30 31 4
gpt4 key购买 nike

我在 build.gradle 中创建了 2 个任务。当我运行任务“remoteCopy”时,它运行正常。当我运行依赖于“remoteCopy”的任务时,出现以下错误:

Executing task ':importDump' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:importDump FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':importDump'.
> execCommand == null!

任何指向我做错了什么的指针。 build.gradle 如下:

**

- build.gradle

**

task remoteCopy(type: Exec) {
workingDir '/workspace/anivash.mutham/R10_CommercePlatform_DEV/buildtools/scripts'
commandLine './remotecopy.sh'
}


task importDump(dependsOn: remoteCopy,type:Exec) << {
workingDir '/workspace/anivash.mutham/R10_CommercePlatform_DEV/buildtools/scripts'
commandLine './importdump.sh'
}

最佳答案

“importDump”任务声明无效,您必须移动workingDircommandLine来自 << { }/doLast { } block ,因为它们是 Exec 的属性任务。

试试这个:
task importDump(dependsOn: remoteCopy, type: Exec) {
workingDir '/workspace/anivash.mutham/R10_CommercePlatform_DEV/buildtools/scripts'
commandLine './importdump.sh'
}

关于linux - execCommand == null(实际上是 'null not' ),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40046391/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com