Quantcast

grails.config.locations in environments block

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

grails.config.locations in environments block

Sean LeBlanc
I've noticed that I get the same behavior described here, which doesn't look like it's been resolved:

http://jira.grails.org/browse/GRAILS-5108


Is that something that should still work this way? Is there any workaround?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: grails.config.locations in environments block

edward.young
Sean,

I'm not sure if this helps, but I've specified external config files
with an explicit file path rather than using the classpath:

In Config.groovy, dev and test use the descriptor in the file, but
PRODUCTION uses an externalized file.

case "PRODUCTION":
    println("Environment is PRODUCTION")
    grails.config.locations = [
      "file:/opt/somepathelement/data/myapp/.grails/${appName}-config.groovy",
    ]




On Tue, Apr 12, 2011 at 4:09 PM, Sean LeBlanc <[hidden email]> wrote:

> I've noticed that I get the same behavior described here, which doesn't look
> like it's been resolved:
>
> http://jira.grails.org/browse/GRAILS-5108
>
>
> Is that something that should still work this way? Is there any workaround?
>
> --
> View this message in context: http://grails.1312388.n4.nabble.com/grails-config-locations-in-environments-block-tp3445803p3445803.html
> Sent from the Grails - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>



--
- Ed

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: grails.config.locations in environments block

ld@ldaley.com
In reply to this post by Sean LeBlanc

On 13/04/2011, at 8:09 AM, Sean LeBlanc wrote:

> I've noticed that I get the same behavior described here, which doesn't look
> like it's been resolved:
>
> http://jira.grails.org/browse/GRAILS-5108
>
>
> Is that something that should still work this way? Is there any workaround?

That report is bogus and I have closed it. I did a quick test and there is nothing special about this property WRT environment sensitivity so your issue is likely something else.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: grails.config.locations in environments block

mmuzamil
In reply to this post by Sean LeBlanc
I also ran into same issue and as a workaround i wrote following code in Config.groovy

def configLocationStr = ""
environments {
    production {
        configLocationStr = "classpath:config.properties"
    }
    development {
        configLocationStr = "classpath:config.properties"
    }
    test {
        configLocationStr = "classpath:test-config.properties"
    }
}
grails.config.locations = [configLocationStr]
println "grails.config.locations = ${grails.config.locations}"

Sean LeBlanc wrote
I've noticed that I get the same behavior described here, which doesn't look like it's been resolved:

http://jira.grails.org/browse/GRAILS-5108

Is that something that should still work this way? Is there any workaround?
Loading...