Plugins You can find out about all the publicly available Grails plugins.

MorphDeploy Plugin

  • Authors: Marc Palmer
0 vote
compile ":morph-deploy:0.1"



Description Deploy Plugin

This plugin prepares your WAR file for deployment to the scalable deployment platform service.

All you do is create a account, download the JAR + properties file from their site into the root directory of your grails project. Then install this plugin:

grails install-plugin morph-deploy

Once installed this will take care of the following for you:

  • The JNDI datasource will be set up in your web.xml
  • The JNDI mail session will be set up in your web.xml, and the mailsession and mailsender beans configured in resources.groovy (not tested use of this in app yet!)
  • The JDBC 2.0 extensions JAR will be REMOVED from your WAR when you run "grails war". This is required for correct deployment
The plugin provides a "deploy" script that will upload the latest version of your WAR to and deploy it. You can specify a different WAR name on the command line if you don't want this behaviour.

So to deploy your application to all you need to do is:

  1. In DataSource.groovy in the "production" environment, set it up like this:
production {
        dataSource { 
            driverClassName = 'com.mysql.jdbc.Driver'
            dbCreate = "update" 
            jndiName = "java:comp/env/jdbc/morph-ds" 
            dialect = 'org.hibernate.dialect.MySQLDialect'

Obviously you make this change only once. If you are using POSTGRES, use the correct settings for it, as found in the Java cookbook on the website

2. Run: grails war

3. Run: grails deploy

When prompted, enter your Morph account username and password and wait while it uploads and automatically deploys your application!