在Ant中传递Arg

时间:2013-05-09 11:58:21

标签: php ant

我正在使用以下代码块处理Ant脚本:

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

我想要运行的命令如下:

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

我怎么能这样做......!因为上面的代码是有效的。但我不想要<arg value="-l"/>

我想像<arg value="-l"/> <arg value="> *.html"/>

一样传递它

1 个答案:

答案 0 :(得分:1)

设置output属性以指定应将命令输出重定向到的文件。这是ant手册。

相关问题