java - How to pass a variable number of arguments to ant exec -
i have ant target takes variable number of arguments passed exec task. using old mechanism trivial:
<exec command="cmd /c ${_full-path-to-exec}" osfamily="windows" failonerror="true"> </exec>
however, use of 'command' deprecated in favor of nested elements. this:
<exec executable="cmd" osfamily="windows" failonerror="true"> <arg value="/c"/> <arg file="${_full-path-to-exec}"/> <arg value="${_param-one}"/> <arg value="${_param-two}"/> <arg value="${_param-three}"/> </exec>
which makes variable argument lists impossible.
how solve problem?
how this:
<arg line="whatever args need"/>
Comments
Post a Comment