What's the correct way to install a grails plugin from a zip file?

前端 未结 2 1418
独厮守ぢ
独厮守ぢ 2020-12-11 18:17

In recent versions of Grails install-plugin command has been deprecated. What is now the recommended way of installing a plugin that is not available via some repository. As

相关标签:
2条回答
  • 2020-12-11 18:34

    I don't know if it is the correct way but we get it working:

    1. Download and unzip the plugin in a directory within your project
    2. Change your BuildConfig.groovy file to point to the new plugin

    Example: Download webflow.zip plugin and unzip it into a plugins directory within your project. Add this line at end of your BuildConfig file

    grails.plugin.location."webflow" = "plugins/webflow"
    
    0 讨论(0)
  • 2020-12-11 18:39

    I think the easiest approach is to place the zip file in the project's lib folder and then add an entry in the BuildConfig.groovy. For example:

    1. 'grails-image-tools-1.0.5.zip' placed in lib.
    2. runtime ":grails-image-tools:1.0.5" added to BuildConfig.groovy
    

    Since the dependency manager looks inside the project's lib folder as well, I don't have to worry about setting any paths etc.

    EDIT: The latest Grails version that I worked on was 2.1.1. I'm unable to check but according to @Saurabh's comment below this isn't applicable for Grails 2.4.3

    EDIT2: But @Jay says that it works with 2.4.5

    0 讨论(0)
提交回复
热议问题