(Quick Reference)

2 Getting Started - Reference Documentation

Authors: Burt Beckwith

Version: 1.2.3

2 Getting Started

The first step is to install the plugin.

Ideally, add the plugin dependency into BuildConfig.groovy. It is important that the plugin is scoped as compile, otherwise you may get some unexpected problems if you are letting the plugin manage your datasource config:

plugins {
   compile ':cloud-foundry:1.2.3'
}

Alternately you can use the install-plugin command in grails:

grails install-plugin cloud-foundry

Add your Cloud Foundry credentials to grails-app/conf/Config.groovy, or an external config file referenced from Config.groovy, or in $HOME/.grails/settings.groovy:

grails.plugin.cloudfoundry.username = 'your.email@server.com'
grails.plugin.cloudfoundry.password = 's3kr3t'

If you want to deploy with a different application name than your Grails application name, specify it with the grails.plugin.cloudfoundry.appname property:

grails.plugin.cloudfoundry.appname = 'my-cool-app'

If you're using the spring-security-core and/or the resources plugins, be sure to use a recent version (1.2.7+ for spring-security-core and 1.1.6+ for resources) and add an explicit dependency for the webxml plugin to BuildConfig.groovy to ensure that your application deploys correctly:
compile ':webxml:1.4.1'

There are other configuration options, but next you'll want to provision some services and deploy your application. See section 4 Deploying applications for details on that.