title: How override grails configuration from command line
body: <p>I am trying to override <code>dataSource.url</code> value running grails from the command line, example</p>
  
  <pre><code>grails &lt;set property&gt; dbm-status
  </code></pre>
  
  <p>My first try was using <code>-D</code> command line parameter as </p>
  
  <pre><code>grails -DdataSource.url=jdbc:sqlserver://xx.xx.xx.xx;databaseName=db_name
  </code></pre>
  
  <p>I have tried to add an additional config file to <code>grails.config.locations</code> that get values from <code>System.getProperty</code> but does not seems to work.</p>
  
  <p>Exist a built in way to override config values from the command line, otherwise how I can inject parameter from the command line to the grails configuration ?</p>
  
  <p>EDIT: I don't want to use another environment/datasource to avoid datasource configuration duplication and the need to configure things for this new environment.</p>