Configuring a target environment

It is often the case that one wants to use different configuration values for different environments. For example in the case of a contact form one wants to use a different email address for developement/testing than for production. The following resource configuration example


has set the email address twice:

<yanel:property name="to" value=""/>
<yanel:property name="to" value="" target-environment="dev"/>
Once for the default (by convention the production environment) and once for the development environment.

IMPORTANT: Because the 'target environment' functionality has been introduced at some later stage, one needs to increase the version number of the particular resource configuration XML from 1.0 to 1.1 or higher, e.g.

<yanel:resource-config xmlns:yanel="">

The environment of a Yanel instance can be configured inside


by setting for example

Please note that the build process (from source) might overwrite this configuration unless set inside


which is based on the configuration template


One is free to choose the name of a target environment, but it's recommended to use the below names by convention:

  • prod = production
  • ua-test = user acceptance test
  • ci-test = continuous integration test
  • dev = development

Configurations supporting the target-environment attribute

The following configuration types are currently supporting the target-environment attribute:

Please let us know if you think other configurations should also support the target-environment attribute.

Your comments are much appreciated

Is the content of this page unclear or you think it could be improved? Please add a comment and we will try to improve it accordingly.