On Fri, 2002-07-05 at 10:25, Bart Selders wrote:
> This patch involves a small change in org.apache.maven.util.HttpUtils 
> that will prevent
> creating zero size jar files when a download from a remote repository 
> fails. It now creates the destination file only when a remote file can 
> be fetched.
> 
> This solves the following bug: we use 2 remote repositories for jar 
> files, one from Jakarta, and one internal one. Some jar files are only 
> available internally, thus fail to download from Jakarta's jarsite. 
> However they are still created with a zero file size by the HttpUtils 
> class, which is wrong.

Hey Bart!

Yes, the described behaviour is wrong. I applied your patch, thanks!
 
> Best regards,
> 
> Bart Selders
> 
> 
> 
> *************************************************************************
> The information contained in this communication is confidential and is
> intended solely for the use of the individual or entity to  whom it is
> addressed.You should not copy, disclose or distribute this communication 
> without the authority of iBanx bv. iBanx bv is neither liable for 
> the proper and complete transmission of the information has been maintained
> nor that the communication is free of viruses, interceptions or interference.
> 
> If you are not the intended recipient of this communication please return
> the communication to the sender and delete and destroy all copies.
> ----
> 

> --- HttpUtils.java.orig       Fri Jul  5 16:07:17 2002
> +++ HttpUtils.java    Fri Jul  5 15:43:26 2002
> @@ -178,10 +178,7 @@
>              // if-modified-since behaviour - we just check the date of the 
>              // content and skip the write if it is not newer. 
>              // Some protocols (FTP) dont include dates, of course.
> -
> -            FileOutputStream fos = new FileOutputStream(destinationFile);
> -            logx("Writing " + destinationFile);
> -
> +         
>              InputStream is = null;
>              for (int i = 0; i < 3; i++)
>              {
> @@ -206,6 +203,9 @@
>                      "Can't get " + file + " to " + destinationFile);
>              }
>  
> +            FileOutputStream fos = new FileOutputStream(destinationFile);
> +            logx("Writing " + destinationFile);
> +
>              byte[] buffer = new byte[100 * 1024];
>              int length;
>  
> 
> ----
> 

> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
-- 
jvz.

Jason van Zyl
[EMAIL PROTECTED]
http://tambora.zenplex.org

In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
  
  -- Jacques Ellul, The Technological Society


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to