How to deploy grails app with private cloud plugin

I created a private plugin for domain objects that are shared between two grails applications. I can use the plugin successfully in my local environment since I set the path to it through the BuildConfig file. For example, I have the following directories:

appOne/ myPlugin/grails-my-plugin-0.1.zip (myPlugin is a grails plugin project dir) 

In: appOne / grails-app / conf / BuildConfig.groovy:

 grails.plugin.location.compileMyPlugin = "../myPlugin" 

My question is: what is the right / best way to handle the "packaging" of this plugin with my version of the application so that I can deploy it to the cloud service where it will not be available for download? I guess there is a way for the grail to do this for you, but I'm not sure. (I am very new to grails)

+1
grails
source share
3 answers

In Grails 2.1.0 solution, I decided to do the following:

1) In the Grails plugin project:
grails package-plugin Produces the file grails-myplugin-0.1.zip

2) Copy the plugin into the directory of my application lib (appOne / lib / grails-myplugin-0.1.zip)

3) In BuildConfig.groovy

  • Delete: grails.plugin.location.compilemyPlugin = "../myPlugin"
    This was / is used during development to prevent the reinstallation / reinstallation process when updating the files included in the plugin.

  • Add

    plugins {
    .....
    compilation ': grails-myPlugin: 0.1'
    }

4) Test cleaning appOne and run to install / reinstall the plugin through the lib directory

5) Commit all the changes and add the plug-in zip file to appOne and click. Cloud provider
Heroku in this case can resolve the addiction.

+2
source share

When you create a .war file for deployment, grails just includes your plugin. Therefore, you have nothing special.

If your project is built in the cloud, you can try to specify the path to the file as a local repository:

 repositories { grailsCentral() localRepo "../myPlugin" } 

Just release your zipped plugin in this folder and grails will find it.

+2
source share

Your build script should first package the plugin and then install the plugin in your Grails application. At least that's how I should do it. If you try to use both plugins specified in the BuildConfig dependencies, and as a built-in plugin, Grails tends to complain about it.

+1
source share

All Articles