Grails
  1. Grails
  2. GRAILS-7668

Building an application with an inline plugin fails to resolve dependency

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.4-M1
    • Fix Version/s: None
    • Component/s: Build System
    • Labels:
      None

      Description

      After upgrading from 1.3.7 to 1.4 my applications that now share a common plugin constantly fail to build when using an inplace plugin.
      The resulting error is that the plugin is not found when it clearly is in the defined path for the inplace plugin

      grails.plugin.location.'myplugin'="../common/plugins/myplugin"

        Activity

        Hide
        Samuel Doyle added a comment -

        In addition to the inline plugin there was also dependency on this defined in the plugins, this wasn't a problem in 1.3.7 but is now in 1.4.0.
        I suppose this issue can be closed bit it means either removing or commenting out the dependency in the plugin section.

        Show
        Samuel Doyle added a comment - In addition to the inline plugin there was also dependency on this defined in the plugins, this wasn't a problem in 1.3.7 but is now in 1.4.0. I suppose this issue can be closed bit it means either removing or commenting out the dependency in the plugin section.
        Hide
        Graeme Rocher added a comment -

        Could you attach an example that reproduces the issue? we have some functional tests that verify inline plugins work so it must be something specific

        Show
        Graeme Rocher added a comment - Could you attach an example that reproduces the issue? we have some functional tests that verify inline plugins work so it must be something specific
        Hide
        Angelo Alfano added a comment -

        I have the same issue with 2.0.M1 (OSX 10.7.1) even with brand new 2.0 app and plugin, I attach an example

        Show
        Angelo Alfano added a comment - I have the same issue with 2.0.M1 (OSX 10.7.1) even with brand new 2.0 app and plugin, I attach an example
        Hide
        Graeme Rocher added a comment -

        I'm not sure I understand the issue. You are defining the plugin twice. Once in the plugins section and once as an inline plugin. If you remove the former declaration:

        //        compile ":test-plg:0.1"
        

        Then everything works as expected

        Show
        Graeme Rocher added a comment - I'm not sure I understand the issue. You are defining the plugin twice. Once in the plugins section and once as an inline plugin. If you remove the former declaration: // compile ":test-plg:0.1" Then everything works as expected
        Hide
        Stéphane Maldini added a comment -

        Status ?

        Show
        Stéphane Maldini added a comment - Status ?
        Hide
        Graeme Rocher added a comment -

        Stephane - as I said I don't regard this as a bug since if the plugin is inline you shouldn't define it in your plugins { } block

        Show
        Graeme Rocher added a comment - Stephane - as I said I don't regard this as a bug since if the plugin is inline you shouldn't define it in your plugins { } block
        Hide
        Ondrej Kvasnovsky added a comment -

        Graeme, get Grails 2.3.0.RC1, create new application, create new plugin. Reference the plugin directly (inline) from the application. Then reference compile ":quartz2:2.1.6.2" in the newly created plugin and use some classes from quarts. If you compile the plugin, it is without problems. If you try to compile/run-app the application, you get compilation error where you have used the quartz class (it is not quartz specific issue, quartz is just an example).

        So, I have found we need to publish plugin in the maven local repo: http://www.objectpartners.com/2013/02/13/grails-2-2-publishing-your-plugins-as-maven-artifacts-to-resolve-dependency-resolution-issues/

        But it quite limits development possibilities.

        Show
        Ondrej Kvasnovsky added a comment - Graeme, get Grails 2.3.0.RC1, create new application, create new plugin. Reference the plugin directly (inline) from the application. Then reference compile ":quartz2:2.1.6.2" in the newly created plugin and use some classes from quarts. If you compile the plugin, it is without problems. If you try to compile/run-app the application, you get compilation error where you have used the quartz class (it is not quartz specific issue, quartz is just an example). So, I have found we need to publish plugin in the maven local repo: http://www.objectpartners.com/2013/02/13/grails-2-2-publishing-your-plugins-as-maven-artifacts-to-resolve-dependency-resolution-issues/ But it quite limits development possibilities.

          People

          • Assignee:
            Graeme Rocher
            Reporter:
            Samuel Doyle
          • Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Last Reviewed:

              Development