ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Tulley" <JTUL...@novell.com>
Subject Re: [patch] Execute.java needs support for NetWare
Date Thu, 15 Nov 2001 16:02:32 GMT
Odd, I diffed it right before submitting it.  I know in his email to me explaining how he would
do it he used the Os.isfamily method that wasn't in the source I saw.  Maybe I need to learn
how to use WinCVS a little better! 

No, I think I had that correct, since what we are talking about is not the command itself,
but the script name.  antRun should be something of the form  "(ANT_HOME)/bin/antRun.pl" 
 The cmd has the "ls -l" bit.  I'll test it and see how that flies, but I think the first
form was correct.  Actually, after studying the source in-depth, I'm not so sure.  I'll see
how yours works..

Jeff Tulley  (jtulley@novell.com)
(801)861-5322
Novell, Inc., the leading provider of Net services software.

>>> donaldp@apache.org 11/15/01 1:18:03 AM >>>
Hi,

On Thu, 15 Nov 2001 08:36, Jeff Tulley wrote:
> In this patch I have created a special case for NetWare akin to those for
> other OSes.  If not using a VM launcher(same as other OSes), NetWare uses a
> new "PerlScriptCommandLauncher", and looks for antRun.pl to carry out the
> exec command.  The PerlScriptCommandLauncher is remarkably similar to the
> ScriptCommandLauncher, though it prefixes the antRun command with "perl ". 
> This is portable to Windows if the need ever arose, but I'm not sure of the
> behavior on Unix.  (Been a while, I cannot remember if you simply reference
> the script directly or have to call "perl script.pl").

I added this with some slight modifications. You didn't diff against the 
latest version so I had to fix up a few thigns that changed with a patch 
Stefan applied ;)

I also modified the execute perl launcher to look like

+            String[] newcmd = new String[cmd.length + 3];
+            newcmd[0] = "perl";
+            newcmd[1] = antRun;
+            newcmd[2] = commandDir.getAbsolutePath();
+            System.arraycopy(cmd, 0, newcmd, 3, cmd.length);

rather than

+
+            String[] newcmd = new String[cmd.length + 2];
+            newcmd[0] = "perl " + antRun;
             newcmd[1] = commandDir.getAbsolutePath();
             System.arraycopy(cmd, 0, newcmd, 2, cmd.length);

because as far as I know the second will not work properly (at least in a 
cross platform way) as the first argument will be treated as an executable. 
So in effect if you tried to execute "ls -l", the underlying OS would look 
for executable of form "perl ls" and pass it a single argument of "-l" which 
is not the behaviour I would expect ;)

Other than that it seems fine. Can you download and check it - thanks!

> As far as I know, this should complete the port to NetWare.  But, there are
> still some bugs in how Ant functions on NetWare, namely: 1) The
> ExecuteWatchdog stuff doesn't behave properly
> 2) I am doubting that ant will work at all on JVM 1.1.7b of NetWare and
> only marginally well on JVM 1.2.2.  Everything that I have tested works
> well on 1.3.  The problem with the previous JVMs is due to JVM bugs, not
> Ant problems.  There will be no further development on 1.1.7b(I think), so
> that might be SOL.  Since the result of some of these bugs is a system
> crash, we will need to document on which JVMs on NetWare ant does not
> function.

WIll wait most eagerly for the documentation ;)

-- 
Cheers,

Pete

------------------------------------------------------
 Mark Twain: "In the real world, the right thing never
happens in the right place at the right time. It is 
the task of journalists and historians to rectify 
this error."
------------------------------------------------------

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



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


Mime
View raw message