diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 5484a2f2..c1c378c9 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -7,8 +7,8 @@ on: branches: - '[3-9]+.[0-9]+.x' env: - GIT_USER_NAME: puneetbehl - GIT_USER_EMAIL: behlp@unityfoundation.io + GIT_USER_NAME: 'grails-build' + GIT_USER_EMAIL: 'grails-build@users.noreply.github.com' jobs: @@ -20,13 +20,12 @@ jobs: fail-fast: true matrix: java: [17] - steps: - uses: actions/checkout@v4 - uses: gradle/wrapper-validation-action@v2 - uses: actions/setup-java@v4 with: - distribution: temurin + distribution: 'liberica' java-version: ${{ matrix.java }} - uses: gradle/actions/setup-gradle@v3 env: @@ -43,7 +42,9 @@ jobs: - uses: actions/checkout@v4 - uses: gradle/wrapper-validation-action@v2 - uses: actions/setup-java@v4 - with: { java-version: 17, distribution: temurin } + with: + distribution: 'liberica' + java-version: 17 - name: Build Project uses: gradle/actions/setup-gradle@v3 @@ -57,12 +58,11 @@ jobs: uses: gradle/actions/setup-gradle@v3 env: GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} - ORG_GRADLE_PROJECT_artifactoryPublishUsername: ${{ secrets.ARTIFACTORY_USERNAME }} - ORG_GRADLE_PROJECT_artifactoryPublishPassword: ${{ secrets.ARTIFACTORY_PASSWORD }} + MAVEN_PUBLISH_USERNAME: ${{ secrets.MAVEN_PUBLISH_USERNAME }} + MAVEN_PUBLISH_PASSWORD: ${{ secrets.MAVEN_PUBLISH_PASSWORD }} + MAVEN_PUBLISH_URL: ${{ secrets.MAVEN_PUBLISH_SNAPSHOT_URL }} with: - arguments: | - -Dorg.gradle.internal.publish.checksums.insecure=true - publish + arguments: publish - name: Generate Snapshot Documentation if: success() diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8031c551..45d0b366 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,9 @@ jobs: - uses: actions/checkout@v4 - uses: gradle/wrapper-validation-action@v2 - uses: actions/setup-java@v4 - with: { java-version: 17, distribution: temurin } + with: + distribution: 'liberica' + java-version: 17 - name: Get the current release version id: release_version @@ -33,16 +35,14 @@ jobs: uses: gradle/actions/setup-gradle@v3 env: GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} - ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }} - ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }} - ORG_GRADLE_PROJECT_sonatypeStagingProfileId: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} + NEXUS_PUBLISH_USERNAME: ${{ secrets.NEXUS_PUBLISH_USERNAME }} + NEXUS_PUBLISH_PASSWORD: ${{ secrets.NEXUS_PUBLISH_PASSWORD }} + NEXUS_PUBLISH_NEXUS_URL: ${{ secrets.NEXUS_PUBLISH_RELEASE_URL }} + NEXUS_PUBLISH_STAGING_PROFILE_ID: ${{ secrets.NEXUS_PUBLISH_STAGING_PROFILE_ID }} SIGNING_KEY: ${{ secrets.SIGNING_KEY }} SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }} with: - arguments: | - -Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg - publishToSonatype - closeAndReleaseSonatypeStagingRepository + arguments: -Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg publishToSonatype closeAndReleaseSonatypeStagingRepository - name: Generate Documentation if: success() diff --git a/.sdkmanrc b/.sdkmanrc new file mode 100644 index 00000000..b3523fd6 --- /dev/null +++ b/.sdkmanrc @@ -0,0 +1,2 @@ +# Enable auto-env through the sdkman_auto_env config - https://sdkman.io/usage#env +java=17.0.12-librca \ No newline at end of file diff --git a/build.gradle b/build.gradle index 95135564..3a9f9eba 100644 --- a/build.gradle +++ b/build.gradle @@ -1,18 +1,30 @@ +import org.grails.gradle.plugin.doc.PublishGuideTask + +buildscript { + repositories { + maven { url "https://repo.grails.org/grails/core" } + mavenCentral() + } + dependencies { + classpath "org.grails.grails-doc:org.grails.grails-doc.gradle.plugin:$grailsVersion" + classpath "org.grails:grails-gradle-plugin:$grailsVersion" + } +} + plugins { - id 'groovy' - id 'java-library' - id 'io.github.gradle-nexus.publish-plugin' - id 'maven-publish' - id 'signing' + id "java-library" + id "eclipse" + id "idea" } + version = projectVersion group = 'org.grails.plugins' -ext.set('grailsVersion', libs.versions.grails.get()) -ext.set('isReleaseVersion', !version.toString().endsWith('-SNAPSHOT')) -ext.set('isSnapshot', !isReleaseVersion) -apply plugin: 'org.grails.grails-plugin' // Needs to be applied after grailsVersion has been set +apply plugin: "org.grails.grails-plugin" +apply plugin: 'org.grails.grails-doc' +apply plugin: 'org.grails.grails-publish' + repositories { mavenLocal() @@ -20,27 +32,77 @@ repositories { maven { url = 'https://repo.grails.org/grails/core' } } +compileJava { + options.release = 17 +} + +repositories { + mavenCentral() + maven { url "https://repo.grails.org/grails/core" } +} + dependencies { - api libs.quartz + api "org.quartz-scheduler:quartz:$quartzVersion" + + implementation "org.grails:grails-bootstrap" + implementation "org.grails:grails-core" + implementation "org.apache.groovy:groovy-sql" + implementation "org.springframework:spring-beans" + implementation "org.springframework:spring-context" + implementation "org.springframework:spring-context-support" + compileOnly "org.apache.groovy:groovy" + compileOnly "jakarta.annotation:jakarta.annotation-api" + + testImplementation "org.spockframework:spock-core" + + testRuntimeOnly "org.slf4j:slf4j-nop:$slf4jVersion" // Get rid of warning about missing slf4j implementation during test task +} + +jar { + exclude "application.groovy" + exclude "src/test/projects/**" +} + +test { + useJUnitPlatform() +} - implementation libs.grails.bootstrap - implementation libs.grails.core - implementation libs.groovy.sql - implementation libs.spring.beans - implementation libs.spring.context - implementation libs.spring.context.support - compileOnly libs.groovy.core // CompileStatic and Slf4j - compileOnly libs.javax.annotation.api // Provided +configurations.register('groovydocConfiguration') +configurations.register('guideConfiguration') - testImplementation libs.spock.core +dependencies { + + groovydocConfiguration localGroovy(), { + because 'groovydoc needs to run with the same version as Gradle' + } + + guideConfiguration "org.grails:grails-docs" + guideConfiguration "org.apache.groovy:groovy-templates" +} + +tasks.withType(Groovydoc).configureEach { + access = GroovydocAccess.PRIVATE + processScripts = false + includeMainForScripts = false + includeAuthor = true + classpath = configurations.groovydocConfiguration + groovyClasspath = configurations.groovydocConfiguration +} - testRuntimeOnly libs.slf4j.nop // Get rid of warning about missing slf4j implementation during test task +tasks.withType(PublishGuideTask).configureEach { + classpath = configurations.guideConfiguration } -apply from: layout.projectDirectory.file('gradle/java-config.gradle') -apply from: layout.projectDirectory.file('gradle/grails-plugin-config.gradle') -apply from: layout.projectDirectory.file('gradle/testing-config.gradle') -apply from: layout.projectDirectory.file('gradle/documentation-config.gradle') -apply from: layout.projectDirectory.file('gradle/publishing.gradle') \ No newline at end of file +grailsPublish { + githubSlug = 'grails/grails-quartz' + license { + name = 'Apache-2.0' + } + title = 'Grails Quartz Plugin' + desc = 'This plugin allows your Grails application to schedule jobs to be executed using a specified interval or cron expression.' + developers = ['burtbeckwith': 'Burt Beckwith', 'jeffscottbrown': 'Jeff Scott Brown', 'graemerocher': 'Graeme Rocher', + 'ryanvanderwerf':'Ryan Vanderwerf','sergeynebolsin': 'Sergey Nebolsin', 'puneetbehl': 'Puneet Behl', + 'vitaliisamolovskikh':'Vitalii Samolovskikh'] +} \ No newline at end of file diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle deleted file mode 100644 index 710db146..00000000 --- a/buildSrc/build.gradle +++ /dev/null @@ -1,9 +0,0 @@ -repositories { - mavenCentral() - maven { url = 'https://repo.grails.org/grails/core' } -} - -dependencies { - implementation buildsrcLibs.nexus.publish.gradle.plugin - runtimeOnly buildsrcLibs.grails.gradle.plugin -} \ No newline at end of file diff --git a/buildSrc/settings.gradle b/buildSrc/settings.gradle deleted file mode 100644 index 6cd9ab17..00000000 --- a/buildSrc/settings.gradle +++ /dev/null @@ -1,7 +0,0 @@ -dependencyResolutionManagement { - versionCatalogs { - buildsrcLibs { - from(files('../gradle/buildsrc.libs.versions.toml')) - } - } -} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 415b40af..7c9ae259 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,12 +1,10 @@ projectVersion=4.0.0-SNAPSHOT -# This prevents the Grails Gradle Plugin from unnecessarily excluding slf4j-simple in the generated POMs -# https://github.com/grails/grails-gradle-plugin/issues/222 -slf4jPreventExclusion=true +grailsVersion=7.0.0-SNAPSHOT +quartzVersion=2.5.0 +slf4jVersion =2.0.16 -websiteUrl=https://grails.github.io/grails-quartz/latest/ -issueTrackerUrl=https://github.com/grails/grails-quartz/issues -vcsUrl=https://github.com/grails/grails-quartz +slf4jPreventExclusion=true org.gradle.caching=true org.gradle.daemon=true diff --git a/gradle/buildsrc.libs.versions.toml b/gradle/buildsrc.libs.versions.toml deleted file mode 100644 index 0dd107a6..00000000 --- a/gradle/buildsrc.libs.versions.toml +++ /dev/null @@ -1,7 +0,0 @@ -[versions] -grails-gradle-plugin = '7.0.0-SNAPSHOT' -nexus-publish-gradle-plugin = '1.3.0' - -[libraries] -grails-gradle-plugin = { module = 'org.grails:grails-gradle-plugin', version.ref = 'grails-gradle-plugin' } -nexus-publish-gradle-plugin = { module = 'io.github.gradle-nexus:publish-plugin', version.ref = 'nexus-publish-gradle-plugin' } diff --git a/gradle/documentation-config.gradle b/gradle/documentation-config.gradle deleted file mode 100644 index 2fdf9b2a..00000000 --- a/gradle/documentation-config.gradle +++ /dev/null @@ -1,29 +0,0 @@ -import org.grails.gradle.plugin.doc.PublishGuideTask - -apply plugin: 'org.grails.grails-doc' - -configurations.register('groovydocConfiguration') -configurations.register('guideConfiguration') - -dependencies { - - groovydocConfiguration localGroovy(), { - because 'groovydoc needs to run with the same version as Gradle' - } - - guideConfiguration libs.grails.docs - guideConfiguration libs.groovy.templates -} - -tasks.withType(Groovydoc).configureEach { - access = GroovydocAccess.PRIVATE - processScripts = false - includeMainForScripts = false - includeAuthor = true - classpath = configurations.groovydocConfiguration - groovyClasspath = configurations.groovydocConfiguration -} - -tasks.withType(PublishGuideTask).configureEach { - classpath = configurations.guideConfiguration -} \ No newline at end of file diff --git a/gradle/grails-plugin-config.gradle b/gradle/grails-plugin-config.gradle deleted file mode 100644 index da07410b..00000000 --- a/gradle/grails-plugin-config.gradle +++ /dev/null @@ -1,7 +0,0 @@ -tasks.named('bootJar') { - enabled = false // Plugins should not create a bootJar -} -tasks.named('jar', Jar) { - enabled = true // Enable the jar task again, as the bootJar task has been disabled - archiveClassifier = '' // Remove '-plain' suffix from jar file name -} \ No newline at end of file diff --git a/gradle/java-config.gradle b/gradle/java-config.gradle deleted file mode 100644 index 52b8e49b..00000000 --- a/gradle/java-config.gradle +++ /dev/null @@ -1,5 +0,0 @@ -java { - sourceCompatibility = JavaVersion.VERSION_17 - withSourcesJar() - withJavadocJar() -} \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml deleted file mode 100644 index 540da1f1..00000000 --- a/gradle/libs.versions.toml +++ /dev/null @@ -1,23 +0,0 @@ -[versions] -grails = '7.0.0-SNAPSHOT' -groovy = '4.0.24' -javax-annotation-api = '1.3.2' -quartz = '2.3.2' -slf4j = '1.7.36' -spring = '5.3.33' -spock = '2.4-groovy-4.0-SNAPSHOT' - -[libraries] -grails-bootstrap = { group = 'org.grails', name = 'grails-bootstrap', version.ref = 'grails' } -grails-core = { group = 'org.grails', name = 'grails-core', version.ref = 'grails' } -grails-docs = { group = 'org.grails', name = 'grails-docs', version.ref = 'grails' } -groovy-core = { group = 'org.apache.groovy', name = 'groovy', version.ref = 'groovy' } -groovy-sql = { group = 'org.apache.groovy', name = 'groovy-sql', version.ref = 'groovy' } -groovy-templates = { group = 'org.apache.groovy', name = 'groovy-templates', version.ref = 'groovy' } -javax-annotation-api = { module = 'javax.annotation:javax.annotation-api', version.ref = 'javax-annotation-api' } -quartz = { group = 'org.quartz-scheduler', name = 'quartz', version.ref = 'quartz' } -slf4j-nop = { group = 'org.slf4j', name = 'slf4j-nop', version.ref = 'slf4j' } -spring-beans = { group = 'org.springframework', name = 'spring-beans', version.ref = 'spring' } -spring-context = { group = 'org.springframework', name = 'spring-context', version.ref = 'spring' } -spring-context-support = { group = 'org.springframework', name = 'spring-context-support', version.ref = 'spring' } -spock-core = { group = 'org.spockframework', name = 'spock-core', version.ref = 'spock' } \ No newline at end of file diff --git a/gradle/publishing.gradle b/gradle/publishing.gradle deleted file mode 100644 index 3d3da001..00000000 --- a/gradle/publishing.gradle +++ /dev/null @@ -1,111 +0,0 @@ -import io.github.gradlenexus.publishplugin.InitializeNexusStagingRepository - -ext.set('signing.keyId', findProperty('signing.keyId') ?: System.getenv('SIGNING_KEY')) -ext.set('signing.password', findProperty('signing.password') ?: System.getenv('SIGNING_PASSPHRASE')) - -def javaComponent = components.named('java') -publishing { - publications { - register('grailsQuartzPlugin', MavenPublication) { - from javaComponent.get() - versionMapping { - usage('java-api') { fromResolutionOf('runtimeClasspath') } - usage('java-runtime') { fromResolutionResult() } - } - pom { - name = 'Grails Quartz plugin' - description = 'Grails plugin for Quartz scheduler integration' - url = 'https://github.com/grails/grails-quartz' - licenses { - license { - name = 'The Apache License, Version 2.0' - url = 'https://www.apache.org/licenses/LICENSE-2.0.txt' - } - } - developers { - developer { - id = 'osscontributor' - name = 'Jeff Brown' - email = 'brownj@ociweb.com' - } - developer { - id = 'nebolsin' - name = 'Sergey Nebolsin' - email = 'nebolsin@gmail.com' - } - developer { - id = 'graemerocher' - name = 'Graeme Rocher' - email = 'graeme.rocher@gmail.com' - } - developer { - id = 'rvanderwerf' - name = 'Ryan Vanderwerf' - email = 'rvanderwerf@gmail.com' - } - developer { - id = 'kefirfromperm' - name = 'Vitalii Samolovskikh' - email = 'kefir@perm.ru' - } - } - scm { - connection = 'scm:git:git://github.com/grails/grails-quartz.git' - developerConnection = 'scm:git:ssh://github.com:grails/grails-quartz.git' - url = 'https://github.com/grails/grails-quartz' - } - } - // dependency management shouldn't be included - pom.withXml { - def root = it.asElement() - root.getElementsByTagName('dependencyManagement').each { root.removeChild(it) } - } - } - } - - if (isSnapshot) { - repositories { - maven { - credentials { - username = findProperty('artifactoryPublishUsername') ?: '' - password = findProperty('artifactoryPublishPassword') ?: '' - } - url = uri('https://repo.grails.org/grails/plugins3-snapshots-local') - } - } - } -} - - -def mavenPublication = extensions.findByType(PublishingExtension).publications.named('grailsQuartzPlugin') -tasks.withType(Sign).configureEach { - onlyIf { isReleaseVersion } -} -afterEvaluate { - signing { - required = { isReleaseVersion } - sign mavenPublication.get() - } -} - -if (isReleaseVersion) { - nexusPublishing { - String sonatypeUsername = findProperty('sonatypeUsername') ?: '' - String sonatypePassword = findProperty('sonatypePassword') ?: '' - String sonatypeStagingProfileId = findProperty('sonatypeStagingProfileId') ?: '' - repositories { - sonatype { - nexusUrl = uri('https://s01.oss.sonatype.org/service/local/') - username = sonatypeUsername - password = sonatypePassword - stagingProfileId = sonatypeStagingProfileId - } - } - } -} - - -//do not generate extra load on Nexus with new staging repository if signing fails -tasks.withType(InitializeNexusStagingRepository).configureEach { - shouldRunAfter = tasks.withType(Sign) -} \ No newline at end of file diff --git a/gradle/testing-config.gradle b/gradle/testing-config.gradle deleted file mode 100644 index f01ed728..00000000 --- a/gradle/testing-config.gradle +++ /dev/null @@ -1,4 +0,0 @@ -tasks.withType(Test).configureEach { - useJUnitPlatform() - testLogging { events 'passed', 'skipped', 'failed', 'standardOut', 'standardError' } -} diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index c44c2304..5c40527d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/grails-app/init/quartz/Application.groovy b/grails-app/init/quartz/Application.groovy index 50034c89..49f3cca3 100644 --- a/grails-app/init/quartz/Application.groovy +++ b/grails-app/init/quartz/Application.groovy @@ -2,9 +2,7 @@ package quartz import grails.boot.GrailsApp import grails.boot.config.GrailsAutoConfiguration -import grails.plugins.metadata.PluginSource -@PluginSource class Application extends GrailsAutoConfiguration { static void main(String[] args) { GrailsApp.run(Application) diff --git a/grails-app/services/grails/plugins/quartz/JobManagerService.groovy b/grails-app/services/grails/plugins/quartz/JobManagerService.groovy index baacdc4b..5c862cdf 100644 --- a/grails-app/services/grails/plugins/quartz/JobManagerService.groovy +++ b/grails-app/services/grails/plugins/quartz/JobManagerService.groovy @@ -31,8 +31,6 @@ import org.quartz.impl.matchers.GroupMatcher */ class JobManagerService { - boolean transactional = false - Scheduler quartzScheduler /** diff --git a/settings.gradle b/settings.gradle index 49f3ddef..ce2e6fc6 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,6 +1,6 @@ plugins { id "com.gradle.enterprise" version '3.16.2' - id 'com.gradle.common-custom-user-data-gradle-plugin' version '1.13' + id 'com.gradle.common-custom-user-data-gradle-plugin' version '2.0.2' } gradleEnterprise { @@ -17,10 +17,14 @@ gradleEnterprise { buildCache { local { enabled = System.getenv('CI') != 'true' } - remote(gradleEnterprise.buildCache) { - def isAuthenticated = System.getenv('GRADLE_ENTERPRISE_ACCESS_KEY') - push = System.getenv('CI') == 'true' && isAuthenticated + remote(HttpBuildCache) { + push = System.getenv('CI') == 'true' enabled = true + url = 'https://ge.grails.org/cache/' + credentials { + username = System.getenv('GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER') + password = System.getenv('GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY') + } } } diff --git a/src/main/groovy/grails/plugins/quartz/JobDetailFactoryBean.java b/src/main/groovy/grails/plugins/quartz/JobDetailFactoryBean.java index 48592410..d7f759f4 100644 --- a/src/main/groovy/grails/plugins/quartz/JobDetailFactoryBean.java +++ b/src/main/groovy/grails/plugins/quartz/JobDetailFactoryBean.java @@ -19,7 +19,6 @@ import org.quartz.JobDetail; import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.InitializingBean; -import org.springframework.beans.factory.annotation.Required; import static org.quartz.JobBuilder.newJob; @@ -40,7 +39,7 @@ public class JobDetailFactoryBean implements FactoryBean, Initializin // Returned object private JobDetail jobDetail; - @Required + public void setJobClass(GrailsJobClass jobClass) { this.jobClass = jobClass; } diff --git a/src/main/groovy/grails/plugins/quartz/cleanup/JdbcCleanup.groovy b/src/main/groovy/grails/plugins/quartz/cleanup/JdbcCleanup.groovy index 60f287cd..68a05511 100644 --- a/src/main/groovy/grails/plugins/quartz/cleanup/JdbcCleanup.groovy +++ b/src/main/groovy/grails/plugins/quartz/cleanup/JdbcCleanup.groovy @@ -1,9 +1,10 @@ package grails.plugins.quartz.cleanup import groovy.sql.Sql -import groovy.util.logging.Slf4j; +import groovy.util.logging.Slf4j +import jakarta.annotation.PostConstruct; + -import javax.annotation.PostConstruct; /** * Contributed by Rocketmiles @@ -16,7 +17,6 @@ import javax.annotation.PostConstruct; public class JdbcCleanup { def dataSource - def grailsApplication @PostConstruct void init() { diff --git a/src/main/groovy/quartz/QuartzGrailsPlugin.groovy b/src/main/groovy/quartz/QuartzGrailsPlugin.groovy index d02721d8..9446e8db 100644 --- a/src/main/groovy/quartz/QuartzGrailsPlugin.groovy +++ b/src/main/groovy/quartz/QuartzGrailsPlugin.groovy @@ -32,13 +32,12 @@ import org.springframework.scheduling.quartz.SchedulerFactoryBean class QuartzGrailsPlugin extends Plugin { // the version or versions of Grails the plugin is designed for - def grailsVersion = "6.0.0 > *" + def grailsVersion = "7.0.0-SNAPSHOT > *" def watchedResources = "file:./grails-app/jobs/**/*Job.groovy" def title = "Quartz" // Headline display name of the plugin - def author = "Jeff Brown" - def authorEmail = "brownj@ociweb.com" + def author = "Jeff Brown" def description = '''\ Adds Quartz job scheduling features ''' @@ -156,10 +155,10 @@ Adds Quartz job scheduling features */ def loadQuartzProperties() { Properties quartzProperties = new Properties() - if (config.containsKey('quartz')) { + if (config.getProperty('quartz')) { // Convert to a properties file adding a prefix to each property ConfigObject configObject = new ConfigObject() - configObject.putAll(config.quartz) + configObject.putAll(config.getProperty('quartz') ?: [:]) quartzProperties << configObject.toProperties('org.quartz') } quartzProperties diff --git a/src/test/groovy/grails/plugins/quartz/JobDetailFactoryBeanSpec.groovy b/src/test/groovy/grails/plugins/quartz/JobDetailFactoryBeanSpec.groovy index fc149698..2433eb44 100644 --- a/src/test/groovy/grails/plugins/quartz/JobDetailFactoryBeanSpec.groovy +++ b/src/test/groovy/grails/plugins/quartz/JobDetailFactoryBeanSpec.groovy @@ -39,7 +39,7 @@ class JobDetailFactoryBeanSpec extends Specification { new JobKey(JOB_NAME, JOB_GROUP) == jobDetail.key JOB_NAME == jobDetail.getJobDataMap().get(JobDetailFactoryBean.JOB_NAME_PARAMETER) jobDetail.durable - !jobDetail.concurrentExectionDisallowed + !jobDetail.isConcurrentExecutionDisallowed() !jobDetail.persistJobDataAfterExecution jobDetail.requestsRecovery() JOB_DESCRIPTION == jobDetail.description @@ -64,7 +64,7 @@ class JobDetailFactoryBeanSpec extends Specification { new JobKey(JOB_NAME, JOB_GROUP) == jobDetail.key JOB_NAME == jobDetail.getJobDataMap().get(JobDetailFactoryBean.JOB_NAME_PARAMETER) !jobDetail.durable - jobDetail.concurrentExectionDisallowed + jobDetail.isConcurrentExecutionDisallowed() jobDetail.persistJobDataAfterExecution !jobDetail.requestsRecovery() jobDetail.description == null