Nico,
Oops - sorry - I should have remembered to delete the
target file on the ftp server. Your patch does make a difference
(ie, it works as expected) now that I have moved the downloaded
optional.jar out of the way.
Thanks for the suggestion.
#!/mjh
-----Original Message-----
From: Mark Hewitt [mailto:[EMAIL PROTECTED]]
Sent: 02 April 2001 12:54
To: '[EMAIL PROTECTED]'
Subject: RE: ftp task throwing ArrayIndexOutOfBoundsException
Nico,
It seems that the optional.jar (that I built) does not have this
problem, but the jakarta-ant-1.3-optional.jar that I downloaded
does.
(Naturally, I only discovered this when figuring out why your
suggested patch made no difference whatever!)
#!/mjh
-----Original Message-----
From: Nico Seessle [mailto:[EMAIL PROTECTED]]
Sent: 02 April 2001 11:04
To: [EMAIL PROTECTED]
Subject: Re: ftp task throwing ArrayIndexOutOfBoundsException
----- Original Message -----
From: "Mark Hewitt" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 02, 2001 10:38 AM
Subject: RE: ftp task throwing ArrayIndexOutOfBoundsException
> Nico,
>
> The ftp task works correctly if I do it unconditionally - ie,
> depends="no".
>
> The manual ftp results you requested are:
>
> ftp> ls notThere.jar
> 200 PORT command successful.
> 150 ASCII data connection for /bin/ls (194.194.22.35,59321) (0 bytes).
> notThere.jar: No such file or directory
> 226 ASCII Transfer complete.
> remote: notThere.jar
> 41 bytes received in 0.018 seconds (2.20 Kbytes/s)
> ftp>
Hm. It should have replied with 550 No such file or directory, shouldn't it?
> Does that help?
Hmm.. the file you are trying to upload are all available on the server? It
seems that the error you posted may occur if the server replies with
something that means "OK", but it isn't. Ant (or NetComponents) then tries
to get the last-modified date of the remote-file and can't get that if the
file is not there.
Do you have access to a java-compiler? If yes you may want to try changing
line 547 in FTP.java from "if (files == null)" to "if (files == null ||
files.length == 0)" and try again. If that helps you please tell me and I
will change that in CVS.
Nico