Quartz 在 Grails4 中不起作用,无法编译依赖问题

Kom*_*sad 2 grails grails-plugin grails-4

在我使用 grails4 的调度程序依赖项中出错:任何人都让我知道调度程序的正确依赖项

dependencies {
compile "org.grails.plugins:quartz:2.0.1"
Run Code Online (Sandbox Code Playgroud)

}

也试过这个:

dependencies {
compile "com.agileorbit:schwartz:1.0.1"
Run Code Online (Sandbox Code Playgroud)

}

两者都无法编译:

grails 运行应用程序 | 解决依赖关系。请稍等...

| 正在运行应用程序...

FAILURE:构建失败,出现异常。

  • 出了什么问题:任务“:compileGroovy”执行失败。

    org/quartz/JobExecutionContext

  • 尝试:使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --info 或 --debug 选项运行以获得更多日志输出。使用 --scan 运行以获得完整的见解。

  • https://help.gradle.org获取更多帮助

构建在 10 秒内失败 | 错误无法启动服务器(使用 --stacktrace 查看完整跟踪)

eri*_*son 5

除了插件之外,您还需要显式添加石英依赖项,因为 Gradle 5 停止引入传递依赖项。另外我建议使用最新版本(2.0.13 vs 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
}
Run Code Online (Sandbox Code Playgroud)