Passing Arg in Ant

社会主义新天地 提交于 2019-12-23 05:39:35

问题


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"/>                               
            </fileset>
            <arg value="-l" />
            <srcfile/>        
            <mapper type="glob" from="*.php" to="*.html"/>        
        </apply>
    </target>

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"/>


回答1:


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



来源:https://stackoverflow.com/questions/16461245/passing-arg-in-ant

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!