(Quick Reference)

create-config

Purpose

The create-config command generates/overwrites the necessary config files for Optimus plugin.

Examples

grails create-config Person
grails create-config "*"

Description

Given at least one domain class, this command creates the following artifacts:

  • src/java/config.properties
  • grails-app/conf/Config.groovy
  • grails-app/conf/DataSource.groovy

This command will overwrite some important files, such as grails-app/conf/Config.groovy and grails-app/conf/DataSource.groovy. Be careful if you are working on an existing application and you have previosuly customized these files.

Usage:

grails create-config [domainClass]

Arguments:

  • domainClass - Either a domain class name (case-sensitive) without its package or a wildcard (*). If you specify the wildcard the artifacts will be generated for all domain classes.

If you don't specify a domain class, the command only generate the following files:
  • src/java/config.properties
  • grails-app/conf/DataSource.groovy

The file grails-app/conf/Config.groovy will not be generated and the command will throw an error about the domain class.