-
-
Notifications
You must be signed in to change notification settings - Fork 952
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configuration: Environments block not merged from plugins #9376
Comments
I've done some experimentation to better understand the actual behavior rather than the documented behavior. My experiments involve an application that uses an inline plugin. I will use the following shorthand:
In my experimentation this is the behavior I am seeing:
My experience is in contradiction with the documentation on upgrading plugins which states that a plugin's application.yml will be merged with the application's application.yml: https://grails.github.io/grails-doc/latest/guide/upgrading.html#upgradingPlugins Step 5. (The second Step 5 since there are 2.) However, aside from the environments, it does match a statement by @graemerocher in this Google Groups post: https://groups.google.com/forum/#!topic/grails-dev-discuss/UrMirr517FU
TL;DR
|
Looks possibly related but not the same thing as #9189 |
It also seems to be the case that a |
I think there are 2 possible solutions here.
Either will work for us but this is a lost feature from 2.x where plugin configs (enviornment specific) could be merged manually via grails.config.locations from consuming projects. 👍 |
I submitted pull request with with option 2 above. |
I have created a new pull request #9491 to allow for multiple plugin environment configs via |
Thanks for the pull request! |
m |
if i use plugin.groovy it will be merged as well like plugin.yml ? |
Hi, can you explain me why the dataSource and hibernate properties are ignoed in a plugin.yml? Thanks! |
Not sure if this is a bug or just undocumented behavior (undocumented as far as I could find at least).
We have several applications with common configuration that we'd like to modularize into a plugin. We have this all working in Grails 2.x and we're trying to migrate to 3.x.
We'd like to make the configurations, per environment, once in the plugin and then have them available in each application that includes the plugin (done as an inline plugin if it makes a difference).
In my testing, the plugin's application.yml is merged with the application's application.yml, but the environments block is ignored.It would be very helpful to us if the environments block was not ignored, but if that's intentional could it be added to the documentation? (And, if it's intentional, any thoughts on a good workaround for what we're trying to do?)
Grails: 3.0.8 & 3.0.9
Java: 1.7
OS: Win 7 64-bit
The text was updated successfully, but these errors were encountered: