batch-file - 如何使用jenkins在命令提示符中运行Grails

标签 batch-file grails jenkins jenkins-plugins

我有一个使用grails 2.4.3版本制作的项目,需要在命令提示符下运行。
我已经制作了一个批处理文件来运行所有命令,
现在,我必须通过Jenkins进行构建,但是在Jenkins中运行该.bat文件时,会出现错误:
Error | Error occurred running Grails CLI: null
但是当我双击运行bat文件时,它运行得很好。

批处理文件:

call grails clean || exit /b

call grails compile || exit /b

call grails package || exit /b

call grails war || exit /b

最佳答案

Gradle不随附Grails2.4.x。我将使用grails包装器(grailsw)。

看一看official docs,以了解有关包装器的更多详细信息,但实际上,您可以执行以下命令:

./grailsw clean 

./grailsw compile 

./grailsw package

./grailsw war 

关于batch-file - 如何使用jenkins在命令提示符中运行Grails,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40168657/

相关文章:

windows - 在 Windows 中 : How do you programatically launch a process in administrator mode under another user context?

batch-file - 如何使用 BAT 文件自动创建 msinfo32.nfo 文件?

grails - 我可以将 grails 服务自动连接到 java src 类吗

java - Grails 1.2.0 - 强制服务回滚

java - 如何在 Jenkins 插件中将对象绑定(bind)到 URL

java - 在 JENKINS 中添加 SVN_AUTHOR 和 SVN_COMMIT_MESSAGE 作为环境变量

string - .BAT - 将字符串变量中的数字转换为以 10 为基数的整数变量

java - Ehcache、Redis 和 Gemfire 哪种缓存适用于哪种场景?

jenkins - 如何向 Jenkins 添加条件参数

string - 替换字符串中的字符