我需要使用该代码运行grails默认命令,例如clean
,compile
,prod war
。
我在项目中创建了一个自定义脚本,我需要通过代码运行这些命令。
我的自定义脚本如下。
class CustomDeploy extends Script {
def run() {
// my code for running commands.
}
}
请帮我。
最佳答案
您可以创建可以访问gradle的Grails脚本。
http://docs.grails.org/latest/guide/commandLine.html#creatingCustomScripts
关于grails - 如何从Grails中的自定义脚本运行Grails默认命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44282000/