Search code examples
pluginsgroovygriffon

Griffon how to run local plugins


Is there a way to work with local plugins (like in grails counterpart: grails.plugin.location)?

I think it's a major drawback if there's not. Developing a plugin with addons and MVCs without this would be a real pain


Solution

  • Griffon supported this feature before 0.9.5 but we had to remove it as it proved to be a source of headaches. Instead we made sure snapshot plugins were easier to work with. In-place plugins in Grails work OK because all Grails plugins are distributed in source mode, which means they get compiled at the same time the application sources get compiled.

    Griffon plugins otoh are distributed in binary form, so you would think it would be easier to have this feature work but no; to begin with transitive dependencies are PITA; next you have to ensure plugins are compiled in the right order with their own dependencies in isolation (this does not happen in Grails!).

    What Griffon offers is a better handling of snapshot dependencies. So it's true, you must compile, package and publish a plugin to a local repo in order to be consumed by the application, but given that Griffon supports local (simple directory structure) and remote (Grails based app) repositories it's actually trivial to get the workflow started.

    Be aware that in Griffon 2.0.0 this point will be moot as Griffon projects will be 100% gradle projects, so you may link plugin projects as part of a multi-project build.