Hi,
I have the following Ant code which I would like to also use on Linux:
<target name="build.XmlJaxb">
<exec dir="${checkout.dest}/XmlJaxb" executable="cmd">
<arg line="/C ant -logger org.apache.tools.ant.XmlLogger
-logfile ant_log_dist.xml dist" />
</exec>
</target>
For Linux I woul dneed to replace "cmd" and "/C" with "bash" or something?
I know there is the <exec> OS option but then I would need to copy the
<exec> tags with a Windows and Linux version. Gives maintenance errors.
I know I could make variables for "cmd" and "/C" and use the <if>
contrib to look at the os Java system property.
I cannot use <ant> task because I do not seem to be able to specify the
Xml logger and the output file.
any ideas?
thanks,
Peter
"." - 08 Apr 2005 17:15 GMT
> Hi,
>
[quoted text clipped - 19 lines]
>
> any ideas?
I usually do something like:
<condition property="cmd" value="cmd.exe>
<os family="windows"/>
</condition>
<property name="cmd" value="bash"/>
Now I can use ${cmd} for the executable. I can do the same thing for the
command line arguments.
The way it works is, if the condition (os family="windows") is true then
cmd=cmd.exe. The <property> tag will do nothing if cmd is already set. If
the condition is false then the <property> tag will set cmd=bash.

Signature
Send e-mail to: darrell dot grainger at utoronto dot ca