我在使用grails4时遇到调度程序相关性错误:任何人都让我知道调度程序的正确依赖项
dependencies {
compile "org.grails.plugins:quartz:2.0.1"
}
并且也尝试过这个:
dependencies {
compile "com.agileorbit:schwartz:1.0.1"
}
两者均无法编译:
grails运行应用|解决依赖关系。请稍候...
|正在运行应用程序...
FAILURE:构建因异常而失败。
出了什么问题:任务':compileGroovy'的执行失败。
org / quartz / JobExecutionContext
尝试:使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行,以获取更多日志输出。使用--scan运行以获取完整的见解。
在https://help.gradle.org获取更多帮助
10秒内失败|错误无法启动服务器(使用--stacktrace查看完整跟踪)
您将需要显式添加quartz插件,因为Gradle 5停止获取传递依赖关系。我也建议使用最新版本(2.0.13和2.0.1,这已经很老了)
buildscript {
dependencies {
classpath 'org.grails.plugins:quartz:2.0.13' // Needed to compile *Job classes
}
}
dependencies {
compile 'org.grails.plugins:quartz:2.0.13'
compile 'org.quartz-scheduler:quartz:2.2.1' // Is not pulled in by default
}