1

I'm writing a Grails plugin that depends on the Quartz plugin, i.e. an application that installs my plugin must also install the Quartz plugin. In order to enforce this requirement, I added the following to the plugin's descriptor

def dependsOn = [quartz: '0.4.2']

However, when I run grails package-plugin I get the error

Error: The following plugins failed to load due to missing dependencies: [quartzJobStats]
- Plugin: quartzJobStats
   - Dependencies:
       ! quartz (Required: 0.4.2, Found: Not Installed) [INVALID]

How am I supposed to specify (plugin) dependencies of a plugin?

1 Answer 1

1

Don't use dependsOn in Grails 2.0+, add a dependency in BuildConfig.groovy

plugins {
   build(':release:2.0.4', ':rest-client-builder:1.0.2') {
      export = false
   }
   compile ":quartz:0.4.2"
}

or this to use the latest:

compile ":quartz:1.0-RC2"
3
  • Sorry, I should have mentioned that it's Grails 1.3.7, does the same advice apply?
    – Dónal
    Sep 7, 2012 at 14:12
  • 1
    Yes, that's valid as of 1.3.x and is important if the plugin will be used by 2.0 apps. You should develop the plugin in 2.x though since otherwise the POM that gets created won't be valid for 2.x apps. Just don't use 2.x features if you also want to support 1.3 users. Sep 7, 2012 at 15:56
  • the plugin is only going to be released internally and we don't use 2.0 internally (yet), so supporting 2.x users isn't an issue (yet). Thanks for your help.
    – Dónal
    Sep 10, 2012 at 8:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.