Eclipse 中 Gradle 任务的 Stacktrace 选项
Stacktrace option for Gradle task in Eclipse
Gradle 任务 classesPipeline
正在 Eclipse 中 运行。此任务根据标准 classes
任务组装 .class
文件,然后尝试执行批处理文件。
一切顺利,直到批处理文件,脚本在 Eclipse 中通过打印到控制台惨死:
Execution failed for task ':classesPipeline'.
> A problem occurred starting process 'command '../SomeFolder/SomeBatchfile.bat''
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
日志建议 运行 任务 --stacktrace
,但我该怎么做?
所以我检查了项目设置,据我所知,Gradle 部分没有提供命令行参数。值得注意的是,运行通过 gradlew 使用 --stacktrace
执行任务对我来说没有任何价值,因为任务执行得很好在这种情况下,这仅发生在 Eclipse 中。
TL;DR:
如何在向 Eclipse 传递参数的同时从 Eclipse 执行 gradle 任务?
对于可能接触到此问题的任何人:
我在一个不同但密切相关的问题中找到了解决方案:
在 build.gradle
中添加以下内容即可:
gradle.startParameter.showStacktrace = org.gradle.api.logging.configuration.ShowStacktrace.ALWAYS
Gradle 任务 classesPipeline
正在 Eclipse 中 运行。此任务根据标准 classes
任务组装 .class
文件,然后尝试执行批处理文件。
一切顺利,直到批处理文件,脚本在 Eclipse 中通过打印到控制台惨死:
Execution failed for task ':classesPipeline'.
> A problem occurred starting process 'command '../SomeFolder/SomeBatchfile.bat''
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
日志建议 运行 任务 --stacktrace
,但我该怎么做?
所以我检查了项目设置,据我所知,Gradle 部分没有提供命令行参数。值得注意的是,运行通过 gradlew 使用 --stacktrace
执行任务对我来说没有任何价值,因为任务执行得很好在这种情况下,这仅发生在 Eclipse 中。
TL;DR:
如何在向 Eclipse 传递参数的同时从 Eclipse 执行 gradle 任务?
对于可能接触到此问题的任何人:
我在一个不同但密切相关的问题中找到了解决方案:
在 build.gradle
中添加以下内容即可:
gradle.startParameter.showStacktrace = org.gradle.api.logging.configuration.ShowStacktrace.ALWAYS