Friday, May 11, 2012

install-plugin not working for local targets in Grails 2.0.3

Just a note for anyone coming across this error:

After getting the JsLint for Grails plugin to work (see the previous post) I noticed there was some easy cleanup I could do on the plugin code. It was a good opportunity to get my feet wet with plugin development.

In the process I learnt that the grails command install-plugin does not work for local plugin targets as specified in the documentation, resulting in a failure to resolve dependency/null pointer error.

  ::          UNRESOLVED DEPENDENCIES         ::
  :: org.grails.plugins#jslint;0.4: java.lang.NullPointerException at org.apache.ivy.plugins.resolver.AbstractResolver.initRepositoryCacheManagerFromSettings(

After quite a bit of Googling I found a comment from a Grails contributor that the feature was actually broken and will produce an error in Grails 2.1 when that is released. He also point referred to a useful section of the documentation that described how to reference a local, unpackaged plugin from one project to another during plugin development, which solved my requirement quite handily:

// Useful to test plugins you are developing.
grails.plugin.location.shiro =
// Useful for modular applications where all plugins and
// applications are in the same directory.
grails.plugin.location.'grails-ui' = "../grails-grails-ui"

(See Specifying Plugin Locations in the same section of the documentation)


  1. Ein paar hundert von Ihnen werden eine gute Uhr an sich kaufen, ohne auf eine Fälschung zurückgreifen zu müssen.Bestimmte Seiko Uhren oder kleine Marken wie Smiths oder Precista von Timefactors sind viel gefolgt und zu Recht. Replica Rolex-Uhren Sie haben große lang anhaltende mechanische Bewegungen und werden für viele Jahre dienen.
    Replik Rolex-Uhren
    Replik omega-Uhren

  2. Hurrah! In the end I got a webpage from where I know
    how to truly obtain valuable information regarding my study and knowledge.
    Thanks for sharinhg!