<?xml version="1.0" encoding="UTF-8"?>
<configuration>
	<header>
		<result>
			<expressionEngine config-class="org.apache.commons.configuration2.tree.xpath.XPathExpressionEngine"/>
		</result>
	</header>
	<override> <!-- Top files overwrite bottom files -->
		<!-- reloadingRefreshDelay is in millisecondi: 20000 = 20 seconds -->
		<system/>
		<env/>
		<!-- security.properties contains sensitive values that should not be pushed to git -->
		<%
			envs.each { env ->
		%>
		<properties fileName="/srv/$acronym$env/bin/security.properties" config-optional="true"/>
		<%
			}
		%>
		<!-- build.properties is in WEB-INF, which is the parent folder of the execution context -->
		<properties fileName="../build.properties" config-optional="true"/>
		<properties fileName="net.yadaframework.yadaweb.properties"/>
		<properties fileName="net.yadaframework.yadawebsecurity.properties" config-optional="true"/>
		<properties fileName="net.yadaframework.yadawebcms.properties" config-optional="true"/>
		<properties fileName="net.yadaframework.yadawebcommerce.properties" config-optional="true"/>

		<!-- Personal configuration for developers -->
		<!-- This file is not found when the app is packaged in a jar -->
		<xml config-name="localdev" config-at="config" fileName="/srv/${acronym}dev/bin/conf.webapp.localdev.xml" 
			reloadingRefreshDelay="4000" config-optional="true" config-reload="true">
		</xml>

		<%
			envs.each { env ->
		%>
		<xml config-name="${env}" config-at="config" fileName="conf.webapp.${env}.xml" 
			reloadingRefreshDelay="4000" config-optional="true" config-reload="true">
		</xml>
		<%
			}
		%>
	</override>
</configuration>
