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

basZero baszero at gmail.com
Thu Oct 13 17:31:10 CEST 2011


sounds great, but I would not reinvent the wheel.
checkout Maven Profiles, they do exactly this.

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>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"/>
>
> 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" env="production"/>
> <yanel:property name="to" value="michael.wechner at wyona.**com<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
> http://lists.wyona.org/cgi-**bin/mailman/listinfo/yanel-**development<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/fd62cc82/attachment.html>


More information about the Yanel-development mailing list