Grails
  1. Grails
  2. GRAILS-9006

Grails 2.0.x doesn't support installing local file based plugins anymore (.zipped)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0.2, 2.0.3
    • Fix Version/s: 2.0.4
    • Component/s: Plugins
    • Labels:
    • Environment:
      macosx 10.7 tested

      Description

      I've moved my domain to a plugin to share among multiple projects. It appears that some grails 2.0.x version broke support for installing .zipped plugins, including self-generated plugins. Any URL form (file or file:///) relative or absolute fails with a NPE:

      ranka:DegreeMgmt jlittle$ grails install-plugin ../DegreeMgmtDomain/grails-degree-mgmt-domain-0.1.zip

      Environment set to development.....
      :: problems summary ::
      :::: WARNINGS
      ::::::::::::::::::::::::::::::::::::::::::::::
      :: UNRESOLVED DEPENDENCIES ::
      ::::::::::::::::::::::::::::::::::::::::::::::
      :: org.grails.plugins#degree-mgmt-domain;0.1: java.lang.NullPointerException at org.apache.ivy.plugins.resolver.AbstractResolver.initRepositoryCacheManagerFromSettings(AbstractResolver.java:396)
      ::::::::::::::::::::::::::::::::::::::::::::::

        Issue Links

          Activity

          Hide
          Vitalii Samolovskikh added a comment -

          Also on

          Windows XP SP3
          Sun JDK 1.6.0_31
          Grails 2.0.3

          Show
          Vitalii Samolovskikh added a comment - Also on Windows XP SP3 Sun JDK 1.6.0_31 Grails 2.0.3
          Hide
          Daniel Mikusa added a comment -

          As a workaround, you can use BuildConfig.groovy to include your plugin.

          Instructions:

          1.) Under the plugin project, execute "grails maven-install". This will install the plugin into your local maven repository (i.e. ~/.m2/repository).

          2.) Under your project, edit "grails-app/conf/BuildConfig.groovy" and uncomment the line "mavenLocal()". Then under the "plugins" section, add 'compile ":demo-plugin:0.1"' substituting "demo-plugin" for the name of your plugin and "0.1" for the version of your plugin.

          3.) The plugin should now be available for use by your application, same as if you did a "grails install-plugin demo-plugin".

          More details...

          http://grails.1312388.n4.nabble.com/added-local-plugin-to-BuildConfig-groovy-td4450167.html
          http://grails.org/doc/latest/guide/conf.html#mavendeploy

          Show
          Daniel Mikusa added a comment - As a workaround, you can use BuildConfig.groovy to include your plugin. Instructions: 1.) Under the plugin project, execute "grails maven-install". This will install the plugin into your local maven repository (i.e. ~/.m2/repository). 2.) Under your project, edit "grails-app/conf/BuildConfig.groovy" and uncomment the line "mavenLocal()". Then under the "plugins" section, add 'compile ":demo-plugin:0.1"' substituting "demo-plugin" for the name of your plugin and "0.1" for the version of your plugin. 3.) The plugin should now be available for use by your application, same as if you did a "grails install-plugin demo-plugin". More details... http://grails.1312388.n4.nabble.com/added-local-plugin-to-BuildConfig-groovy-td4450167.html http://grails.org/doc/latest/guide/conf.html#mavendeploy
          Hide
          Kenneth DeLong added a comment -

          If you are using a custom group id, be sure to write:
          'compile "my.group.id:demo-plugin:0.1"'

          Show
          Kenneth DeLong added a comment - If you are using a custom group id, be sure to write: 'compile "my.group.id:demo-plugin:0.1"'
          Hide
          Werner Hennrich added a comment -

          using
          grails.plugin.location.<pluginName>=<path to local plugin>
          in BuildConfig.groovy also does the trick - without a repo.
          cheers, Werner

          Show
          Werner Hennrich added a comment - using grails.plugin.location.<pluginName>=<path to local plugin> in BuildConfig.groovy also does the trick - without a repo. cheers, Werner
          Hide
          Marc DEXET added a comment -

          Idem with windows seven 32 bit grails 2.0.3.

          Show
          Marc DEXET added a comment - Idem with windows seven 32 bit grails 2.0.3.
          Hide
          Rafael Gutierrez added a comment -

          Same with Linux Ubuntu 11.10 64 bits & grails 2.0.3

          Show
          Rafael Gutierrez added a comment - Same with Linux Ubuntu 11.10 64 bits & grails 2.0.3
          Hide
          Scott Doyle added a comment -

          Is there a timeline as to when version 2.0.4 will be released and also included as a plugin for Springsource Tool Suite? We do not have a local Maven repository in the company and have relied on the install-plugin command to install internally developed plugins in our company. Additionally the Plugin Manager in STS is not working on version 2.9.1 as well. https://issuetracker.springsource.com/browse/STS-2490

          I have to package a version of STS with a version of Grails that will support installing plugins without the need for a corporate Maven repository. I need to distribute this package to a large number of workstations and cannot do it without the ability to install the plugins from a zip file.

          Thanks

          Show
          Scott Doyle added a comment - Is there a timeline as to when version 2.0.4 will be released and also included as a plugin for Springsource Tool Suite? We do not have a local Maven repository in the company and have relied on the install-plugin command to install internally developed plugins in our company. Additionally the Plugin Manager in STS is not working on version 2.9.1 as well. https://issuetracker.springsource.com/browse/STS-2490 I have to package a version of STS with a version of Grails that will support installing plugins without the need for a corporate Maven repository. I need to distribute this package to a large number of workstations and cannot do it without the ability to install the plugins from a zip file. Thanks
          Hide
          Graeme Rocher added a comment -

          2.0.4 this week

          Show
          Graeme Rocher added a comment - 2.0.4 this week

            People

            • Assignee:
              Graeme Rocher
              Reporter:
              Joe Little
            • Votes:
              12 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development