In the following phing xml, inside the "skel" target I check if the app is configured, if it's not then I call the configure target and then apply the config to several files.
The problem is that property db.host
is not set after the phingcall, even though it is set after the propertyprompt.
What am I missing?
<!-- base configuration -->
<property name="paths.config" value="config" />
<property name="paths.config.file" value="${paths.config}/environment.ini" />
<available file="${paths.config.file}" property="configured" />
<target name="configure">
<if>
<equals arg1="${configured}" arg2="true" />
<then>
<echo message="Reconfigure ..." />
</then>
<else>
<echo message="Configure ..." />
</else>
</if>
<propertyprompt propertyName="db.host" defaultValue="localhost" promptText="Mysql Server Host" />
</target>
<target name="skel">
<echo msg="Skel files..." />
<if>
<equals arg1="${configured}" arg2="${configured}" />
<then>
<echo message="Missing config file ..." />
<phingcall target="configure" />
</then>
</if>
<echo message="${db.host}" />
<copy todir="config">
<mapper type="glob" from="*.skel" to="*"/>
<filterchain>
<expandproperties />
</filterchain>
<fileset dir="config">
<include name="*.skel" />
</fileset>
</copy>
</target>