hegdeashwin hegdeashwin - 1 year ago 51
PHP Question

Passing Arg in Ant

I am working on Ant Script with following code block:

<target name="phplint">
<apply dir="${dir.publish.php}" executable="${tool.php.lint}" parallel="true" failonerror="false">
<fileset dir="${dir.publish.php}">
<include name="**/*.php"/>
<arg value="-l" />
<mapper type="glob" from="*.php" to="*.html"/>

The command which i want to run is as below:

php -l index-1.php > index-1.html

How can i do it...! because above code is working. but i don't want
<arg value="-l"/>

I want to pass it like
<arg value="-l"/> <arg value="> *.html"/>

Answer Source

Set the output attribute to specify the file to which the output of your command should be redirected. Here's the ant manual.