Hi,
At our company we're developing Ada95 code for various platforms, including
OpenVMS. We've built our own development tools based on Ant for this. I
was wondering if someone in the Ant community had some useful tips or other
information on this topic to share. E.g. what tasks work / don't work.
I have experienced some problems myself using the <exec> task:
- To use Runtime.exec() the command to be executed usually has to be
written into a temporary DCL script first. Then this script is executed
using Runtime.exec().
- The Java 1.4 JVM provided by Compaq/HP has some problems with
Runtime.exec(). Specifically it doesn't support the variant of
Runtime.exec() with a specified working directory (Runtime#exec(String[],
String[], File)).
- The Ant <exec> task throws a BuildException if the exit code is unequal
zero. On VMS an odd exit code signifies success and even exit codes are
errors. (The exit code zero actually signifies a warning.)
I implemented my own <exec> task by subclassing ExecTask to get around these
incompatibilities. But it proved to be quite hard as some fields and
methods are private and/or final. So I think it would probably be easier to
implement an <exec> task which only is for VMS and plug that in when running
on VMS. Of course all tasks based on ExecTask still won't work. I.e.
<apply> and <chmod>. The latter probably doesn't make sense on VMS anyways,
but <apply> would be nice to have. Maybe <apply> could be refactored to use
the <exec> task instead of subclass its implementation. Does this make
sense?
Regards,
--
knut
|