On Wed, 7 May 2003, Praveen Shenoy <pshenoy1/a@aol.com> wrote:
> <target name="all" depends="copy_files">
> <exec dir="${build.root}/deploy/shopping"
> executable="/bin/sh" failonerror="true" >
> <arg line="tar -cvf ../../ship/package/fedeploy.tar *">
> </arg>
> </exec>
This would rather be
<exec dir="${build.root}/deploy/shopping"
executable="/bin/sh" failonerror="true">
<arg value="-c"/>
<arg value="tar -cvf ../../ship/package/fedeploy.tar *"/>
</exec>
You must tell the shell to execute the following stuff as command
(that's the -c) and the rest must be a single argument (that's why I
changed the line attribute to value).
BTW, you could use <apply> instead of <exec>, not use wildcards at all
and let Ant find the files for you.
<apply executable="tar" dir="${build.root}/deploy/shopping"
parallel="true" relative="true" failonerror="true">
<arg value="-cvf">
<arg file="${build.root}/ship/package/fedeploy.tar"/>
<srcfile/>
<fileset dir="${build.root}/deploy/shopping"
includes="*"/>
</apply>
should be exactly the same as the <exec> above but without using the
shell to expand the wildcard.
Stefan
|