tags:

views:

306

answers:

0

I was just setting up a Phing build.xml file for a Symfony 1.2 application and came across the need to call the symfony propel init tasks.

<!-- build symfony generated libs -->
<!-- TODO: what about calling these from their respective buildfiles? -->
<exec command="/usr/bin/symfony propel:build-model" dir="${build.dir}" passthru="true" />
<exec command="/usr/bin/symfony propel:build-forms" dir="${build.dir}" passthru="true" />
<exec command="/usr/bin/symfony propel:build-filters" dir="${build.dir}" passthru="true" />
<exec command="/usr/bin/symfony propel:build-sql" dir="${build.dir}" passthru="true" />

My question is: for now this is working, but would it be possible to call the Symfony Phing buildfile and targets that run these commands directly? As in a phingcall block or something? Like this:

<-- Do a more complex call -->
<phing phingfile="path/to/symfony/propel/buildfile.xml" target="build-model">
    <property name="foo" value="bar">
    <property name="anotherone" value="32">
</phing>

Or is that just asking for more trouble? Kind of seems like my current setup is calling out to phing from within phing, would be better to just go there directly from a master buildfile.