Search code examples
phing

Setting multiple Phing properties from command line


<?xml version="1.0" ?>
<project name="first" basedir="." default="build-skeleton">

    <property name="dirName" value="module" />
    <property name="fileName" value="config" />

    <target name="build-skeleton" description="Making folders">
        <mkdir dir="./${dirName}/Block" />
        <touch file="./${dirName}/etc/${fileName}.xml" />
    </target>

</project>

phing -f mage_module.xml -DdirName=moduleX,fileName=config
phing -f mage_module.xml -DdirName=moduleX fileName=config

Both throw an error - no surprise there.

Is it possible to set multiple properties in Phing via command line?


Solution

  • Just repeating the -D parameter should work:

    phing -f mage_module.xml -DdirName=moduleX -DfileName=config