Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I extend the classpath used for 'grails run-app'
    primarykey
    data
    text
    <p>I have the following in my Config.groovy file:</p> <pre><code>grails.config.locations = [ "classpath:env.groovy" ] </code></pre> <p>Now, where exactly am I supposed to place "env.groovy" such that it is available on the CLASSPATH during grails run-app? The documentation here is sorely lacking.</p> <p>I am able to get it to work on the pure commandline by placing "env.groovy" in $APP_HOME/etc and then running:</p> <pre><code>$ grails -classpath ./etc run-app </code></pre> <p>This seems a little hackish, but I can live with it... However, I am unable to get any such configuration working when I launch run-app using the Grails eclipse plugin (STS):</p> <pre><code>Unable to load specified config location classpath:env.groovy : class path resource [env.groovy] cannot be opened because it does not exist </code></pre> <p>I've seen related posts <a href="https://stackoverflow.com/questions/3807267/grails-external-configuration-grails-config-locations-absolute-path-file-d">here</a>, <a href="http://grails.1312388.n4.nabble.com/classpath-when-running-grails-run-app-td1355010.html" rel="nofollow noreferrer">here</a>, <a href="http://grails.1312388.n4.nabble.com/Adding-a-properties-file-to-classpath-with-run-app-command-td3023199.html" rel="nofollow noreferrer">here</a>, and <a href="http://little418.com/2010/04/grails-override-configuration-with-properties-file.html" rel="nofollow noreferrer">here</a> but the answers have been unfulfilling.</p> <p>I am looking for a CLASSPATH-based solution that will work with 'run-app' in development mode (both commandline and from eclipse). I know how to set up the CLASSPATH for my deployment servlet container, so that is not an issue.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload