[Yanel-dev] Resource configuration parameters: Differentiating between Development, Testing, Staging and Production

Michael Wechner michael.wechner at wyona.com
Thu Oct 13 22:01:57 CEST 2011


Am 13.10.11 17:31, schrieb basZero:
> sounds great, but I would not reinvent the wheel.
> checkout Maven Profiles, they do exactly this.

I don't think the usage is really the same and I don't think it's 
applicable to the resource configurations,
but I will have a closer look at it.
But anyway, your links are very helpful nevertheless, because I guess we 
can learn from it at least and
also describe the differences in the documentation such that people 
don't get confused.

Thanks for sharing this

Michael
>
> if I remember correctly, Maven Profiles existed as separate files in 
> version 2.x, from 3.x they have been integrated into Maven's 
> settings.xsml:
>
> http://maven.apache.org/settings.html#Profiles
>
> http://maven.apache.org/guides/introduction/introduction-to-profiles.html
>
> Cheers
> Balz
>
> On Tue, Oct 11, 2011 at 9:47 PM, Michael Wechner 
> <michael.wechner at wyona.com <mailto:michael.wechner at wyona.com>> wrote:
>
>     Hi
>
>     Based on some other work it occured to me that it would be nice if
>     one could easily differentiate configuration parameters for
>     various scenarios/environments, e.g. Development, Testing, Staging
>     and Production.
>
>     The Yanel configuration itself already provides "local"
>     configuration files, but in the case of resource configurations
>     this is not the case, e.g.
>
>     src/realms/yanel-website/res-configs-repo/data/en/contact.html.yanel-rc
>
>     and in particular a parameter like
>
>     <yanel:property name="to" value="contact at wyona.com
>     <mailto:contact at wyona.com>"/>
>
>     needs to be changed for development or testing. At the moment one
>     has to keep editing these files
>     with the risk to use a value actually intended for another
>     scenario/environment and hence creating errors.
>
>     I think we could solve this problem in a very elegant way by
>     introducing an attribute, e.g.
>
>     <yanel:property name="to" value="contact at wyona.com
>     <mailto:contact at wyona.com>" env="production"/>
>     <yanel:property name="to" value="michael.wechner at wyona.com
>     <mailto:michael.wechner at wyona.com>" env="development"/>
>
>     whereas inside
>
>     WEB-INF/classes/yanel.xml
>
>     the scenario/environment could be set globally, e.g. production or
>     development or whatever and based on
>     that the right value selected.
>
>     WDYT?
>
>     Thanks
>
>     Michael
>
>
>     -- 
>     Yanel-development mailing list Yanel-development at wyona.com
>     <mailto:Yanel-development at wyona.com>
>     http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development
>
>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wyona.org/pipermail/yanel-development/attachments/20111013/d778269b/attachment.html>


More information about the Yanel-development mailing list