title: Grails 2.1: How to use "schema-export export"?
body: <p>I would like to (re)create my database schema using the command "schema-export". DDL generation works fine, but if I execute "schema export export", I get the following error, which suggest that there is something missing in a configuration file.</p>
  
  <pre><code>grails&gt; dev schema-export export
  | Compiling 1 source files.....
  Exporting in environment 'development' for the default DataSource
  | Error 2012-08-24 14:45:57,466 [main] ERROR hbm2ddl.SchemaExport  - schema export unsuccessful
  Message: No local DataSource found for configuration - 'dataSource' property must be set on LocalSessionFactoryBean
    Line | Method
  -&gt;&gt; 61 | doCall in SchemaExport$_run_closure1
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  | Error 2012-08-24 14:45:57,472 [main] ERROR hbm2ddl.SchemaExport  - schema export unsuccessful
  Message: No local DataSource found for configuration - 'dataSource' property must be set on LocalSessionFactoryBean
    Line | Method
  -&gt;&gt; 64 | doCall in SchemaExport$_run_closure1
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  </code></pre>
  
  <p>My DataSource.groovy defines a "dataSource":</p>
  
  <pre><code>dataSource {
      pooled = true
      driverClassName = "com.mysql.jdbc.Driver"
  }
  ...
  environments {
      development {
          dataSource {
              username = "xxx"
              password = "yyy"
              url = "jdbc:mysql://localhost:3306/chrono_dev?autoreconnect=true"
          }
      }
      ...
  }
  </code></pre>
  
  <p>Any suggestions how to fix this error?</p>