6.1 Creating Profiles - Reference Documentation
Authors: Graeme Rocher, Peter Ledbrook, Marc Palmer, Jeff Brown, Luke Daley, Burt Beckwith, Lari Hotari
Version: 3.1.8
6.1 Creating Profiles
The idea behind creating a new profile is that you can setup a default set of commands and plugins that are tailored to a particular technology or organisation.To create a new profile you can use the create-profile command which will create a new empty profile that extends the base profile:$ grails create-profile mycompany
$ cd mycompany
$ grails
| Enter a command name to run. Use TAB for completion:
grails>create-command create-creator-command create-feature create-generator-command create-gradle-command create-template
create-command
- creates a new command that will be available from the Grails CLI when the profile is usedcreate-creator-command
- creates a command available to the CLI that renders a template (Example: create-controller)create-generator-command
- creates a command available to the CLI that renders a template based on a domain class (Example: generate-controller)create-feature
- creates a feature that can be used with this profilecreate-gradle-command
- creates a CLI command that can invoke gradlecreate-template
- creates a template that can be rendered by a command
profile.yml
.Below is an example profile.yml
file:features:
defaults:
- hibernate
- asset-pipeline
build:
plugins:
- org.grails.grails-web
excludes:
- org.grails.grails-core
dependencies:
compile:
- "org.mycompany:myplugin:1.0.1"
gradle install
:$ gradle install
create-app
command:$ grails create-app myapp --profile mycompany
$ grails create-app myapp --profile com.mycompany:mycompany:1.0.1