Grails
  1. Grails
  2. GRAILS-8316

Inline plugins using grails.plugin.location broken in Grails 2.0

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Not A Bug
    • Affects Version/s: 2.0-RC1
    • Fix Version/s: 2.0-RC2
    • Component/s: Plugins
    • Labels:
      None
    • Environment:
      OS X 10.7

      Description

      Specifying a plugin location for development purposes appears to be broken in 2.0 RC1. I'm getting an unresolved dependency for the plugin during "run-app". It appears to be ignoring the setting, although I've run through the debugger a bit and it looks like the code in AbstractBuildSettings is finding it. I've tried specifying both relative and absolute paths to the plugin directory.

      grails.plugin.location.myplug = "../myplug"

      I am attaching a tar file that shows the issue. There is a directory for grails 1.3 and one for 2.0. Under 1.3, this works, but under 2.0 it does not. The only thing I've done to these projects is to add the plugin dependency to the application and set the above location config.

        Activity

        Hide
        Graeme Rocher added a comment -

        You have the plugin declared inline but also declared under the "plugins" section:

                compile ":myplug:0.1"
        

        This is what is causing the dependency resolve error. Remove the above line and then the application works fine.

        Show
        Graeme Rocher added a comment - You have the plugin declared inline but also declared under the "plugins" section: compile ":myplug:0.1" This is what is causing the dependency resolve error. Remove the above line and then the application works fine.
        Hide
        Jason Young added a comment -

        Thanks, Graeme for taking the time to diagnose this. Should this be called out in the documentation?

        The way I had read it, plugins were defined in the plugins section, but you could specify a location instead of letting ivy determine how to pull it in. Also, it seems the behavior between 1.3 and 2.0 changed in this area - 1.3 seems more forgiving.

        Show
        Jason Young added a comment - Thanks, Graeme for taking the time to diagnose this. Should this be called out in the documentation? The way I had read it, plugins were defined in the plugins section, but you could specify a location instead of letting ivy determine how to pull it in. Also, it seems the behavior between 1.3 and 2.0 changed in this area - 1.3 seems more forgiving.
        Hide
        Marc DEXET added a comment -

        Is it possible to get a more explicit and descriptive explanation of 'grails.plugin.location' feature ? Documentation just say

        An application can load plugins from anywhere on the file system, even if they have not been installed. Specify the location of the (unpacked) plugin in the application's grails-app/conf/BuildConfig.groovy file

        Do we have also to declare plugin in application.properties AND/OR in the BuildConfig.groovy plugin section ?

        Thanks

        Show
        Marc DEXET added a comment - Is it possible to get a more explicit and descriptive explanation of 'grails.plugin.location' feature ? Documentation just say An application can load plugins from anywhere on the file system, even if they have not been installed. Specify the location of the (unpacked) plugin in the application's grails-app/conf/BuildConfig.groovy file Do we have also to declare plugin in application.properties AND/OR in the BuildConfig.groovy plugin section ? Thanks
        Hide
        Rakon Thundarus added a comment -

        First off, Thanks for the comments posted! It helped me with my problem.

        I concur with Marc. The documentation of the change in Grails 2.0 was lacking in this regards. It cost me some time to figure out that I can NOT have the plugin referenced in the application.properties.

        In summary, inline plugins should not be referenced in the application.properties nor the plugins dependency section BuildConfig.groovy.

        Show
        Rakon Thundarus added a comment - First off, Thanks for the comments posted! It helped me with my problem. I concur with Marc. The documentation of the change in Grails 2.0 was lacking in this regards. It cost me some time to figure out that I can NOT have the plugin referenced in the application.properties. In summary, inline plugins should not be referenced in the application.properties nor the plugins dependency section BuildConfig.groovy.

          People

          • Assignee:
            Graeme Rocher
            Reporter:
            Jason Young
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development