maven-wagon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <>
Subject Re: WagonRequest.setBinary()
Date Sun, 07 Dec 2003 12:56:44 GMT
On Sat, 6 Dec 2003 10:20 pm, Michal Maczka wrote:
> Only "transport" out of those which are currently implemented  which might
> have problems with text/binary flag is FTP.
> And AFAIK the problem is related only to line endings.
> Text mode FTP transfer translates lines endings. Binary mode don't.
> I am not sure if this is rising any problem (or at the moment I don' see
> any) but to be on the safe side I decided to
> make it configurable even if such flag can be used in only by Wagon
> provider for FTP protocol.
> If you are sure that we don't' need it I will be happy to remove it.

I guess I see it as dangerous. IMHO it should be expected that if an artifact 
is retrieved from a remote repository it should be identical regardless of 
the transport layer. For example if we download "X.txt" then it should not be 
different if we download it either by ftp, file or http protocols.

I guess I would like to the approach that unless someone figures out a good 
reason for it I would be inclined to remove support to simplify the API and 
remove uneeded code. Less code == easier to evolve and support.

> Other similar problem which I had in Wagon is "getLenght" method in
> PutRequest. I would also prefer to remove it.
> The thing is that SCP protocols needs to know (again I am not 100% sure
> about it) the number of bytes which will be transferred before
> the transfer is started (it sends in to server before transferring any
> data).
> I tried to operate on streams and in some cases the length of the data
> could be unknown.

Unfortunately I can not think of an easy way to get rid of this except by 
copying stream to a temporary file and then transmitting the temporary file. 
This *may* be a solution but for large artifacts it could be prohibitively 


Peter Donald
|    "the mother of idiots is always pregnant."      |

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message