Setting multiple Phing properties from command line
Asked Answered
O

1

9
<?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?

Outreach answered 26/3, 2011 at 18:55 Comment(0)
L
14

Just repeating the -D parameter should work:

phing -f mage_module.xml -DdirName=moduleX -DfileName=config
Lorenzo answered 27/3, 2011 at 21:49 Comment(1)
if you use the "if" and "unless" attributes, just set the variable with no value. xml: <... if="test" > read by phing -DtestPublias

© 2022 - 2024 — McMap. All rights reserved.