You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by "Wannheden, Knut" <kn...@paranor.ch> on 2003/07/10 11:28:32 UTC

on openvms

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

Re: on openvms

Posted by Stefan Bodewig <bo...@apache.org>.
On Thu, 10 Jul 2003, Knut Wannheden <kn...@paranor.ch> wrote:

> At our company we're developing Ada95 code for various platforms,
> including OpenVMS.

You are the first person reporting anything about Ant on OpenVMS
AFAIK.

I used to work with OpenVMS about seven to five years ago, but I've
never done any Java development there.  I've often wondered how Ant's
file handling code was going to work there, given the file name syntax
that doesn't really fit the notion of a "file separator char".

I take your problems with <exec> as an indication that the rest of Ant
seems to work, yes?

>  - 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().

Why?  Is this something specific to the VM implementation or a
limitation imposed by Ant?  Can we solve this by an OpenVMS specific
command launcher in Execute?

>  - 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)).

Should be easy to fix.  We already special case OS/2 here as IBM's 1.3
VM for OS/2 ships with a bogus implementation.  What does the os.name
system property look like?

>  - 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 knew that, but I thought that System/Runtime/Process implementations
would hide it.

This makes Java's System.exit quite a bit inferior to C's exit using
the EXIT_SUCCESS and EXIT_FAILURE constants from stdlib.h, DEC's C
compiler used to define them correctly.

> I implemented my own <exec> task by subclassing ExecTask to get
> around these incompatibilities.

I'd prefer an approach that localized the changes in Execute instead,
if possible.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org