You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Brett Porter <bp...@f2network.com.au> on 2003/11/03 22:22:37 UTC

RE: [PATCH] use CRLF for text files in *.zip, LF for text files i n *.tar.gz

I don't believe in this assumption, as I have in the past (although
reluctantly) used .zip on Unix, and I just about always use .tar.gz on
Windows via cygwin.

I think we only care about fixcrlf'ing the bin directory, with .bat files
getting crlf and shell files (and this is why I always give them a .sh
extension :) getting lf.

Cheers,
Brett

> -----Original Message-----
> From: Rodney Waldhoff [mailto:rwaldhoff@apache.org] 
> Sent: Tuesday, 4 November 2003 7:01 AM
> To: dev@maven.apache.org
> Subject: [PATCH] use CRLF for text files in *.zip, LF for 
> text files in *.tar.gz
> 
> 
> The attached patch uses the ant fixcrlf task to convert line 
> feeds to a platform-appropriate format within plain text 
> files in the source and binary distributions.  There's 
> probably some room for generalization, but this seems like a 
> reasonable start.  (Currently there's not good way to hook in 
> at this level short of modifying the plugin.jelly file, afaik)
> 
> - Rod <http://radio.weblogs.com/0122027/>
> 

RE: [PATCH] use CRLF for text files in *.zip, LF for text files i n *.tar.gz

Posted by Jason van Zyl <jv...@maven.org>.
On Mon, 2003-11-03 at 17:52, Rodney Waldhoff wrote:
> On Tue, 4 Nov 2003, Brett Porter wrote:
> 
> > I don't believe in this assumption, as I have in the past (although
> > reluctantly) used .zip on Unix, and I just about always use .tar.gz on
> > Windows via cygwin.
> 
> There is an assumption either way, this is simply trying to make the
> assumption more accurate.
> 
> If you checkout a project on a Unix machine and do a "maven dist", you get
> unix style linefeeds on all files, including README.txt and LICENSE.txt
> and the like, in both the .zip and .tgz versions of the distribution.
> While this is generally manageable, it is the wrong choice on half the
> platforms.

I thought zip gave you the option when unpacking to select the line
ending? I use 'unzip -a <file>' to get unix line endings.


-- 
jvz.

Jason van Zyl
jason@zenplex.com
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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


RE: [PATCH] use CRLF for text files in *.zip, LF for text files i n *.tar.gz

Posted by Rodney Waldhoff <rw...@apache.org>.
On Tue, 4 Nov 2003, Brett Porter wrote:

> I don't believe in this assumption, as I have in the past (although
> reluctantly) used .zip on Unix, and I just about always use .tar.gz on
> Windows via cygwin.

There is an assumption either way, this is simply trying to make the
assumption more accurate.

If you checkout a project on a Unix machine and do a "maven dist", you get
unix style linefeeds on all files, including README.txt and LICENSE.txt
and the like, in both the .zip and .tgz versions of the distribution.
While this is generally manageable, it is the wrong choice on half the
platforms.

If you checkout a project on a Windows machine and do a "maven dist", you
get DOS style linefreeds on all files, in both the .zip and .tgz versions
of the distribution.  While this is generally manageable, it is the wrong
choice on half the platforms.

With this patch, the *.txt, *.properties and *.xml files are CRLF in .zip
and LF in .tgz.  While this may be the wrong choice in some circumstances
(like when you grab a .zip file on Unix), by and large most people and
most platforms get "native" line endings.

>
> I think we only care about fixcrlf'ing the bin directory, with .bat files
> getting crlf and shell files (and this is why I always give them a .sh
> extension :) getting lf.
>

While scripts are probably more signficant, it'd be nice if the README and
LICENSE files were appropriately line-ended as well.  Is there fixcrlf on
*.bat/*.sh now?

Failing something like this, I think there should at least be some hook
into the relevant parts of maven-dist to allow a project's maven.xml to
support this sort of ant:crlf manipulation short of re-writing the dist
goal or un-tarring/zipping the distributions "manually".  Many ant build
scripts do exactly this conversion, it'd be nice to maintain parity on the
maven side.

> Cheers,
> Brett
>
> > -----Original Message-----
> > From: Rodney Waldhoff [mailto:rwaldhoff@apache.org]
> > Sent: Tuesday, 4 November 2003 7:01 AM
> > To: dev@maven.apache.org
> > Subject: [PATCH] use CRLF for text files in *.zip, LF for
> > text files in *.tar.gz
> >
> >
> > The attached patch uses the ant fixcrlf task to convert line
> > feeds to a platform-appropriate format within plain text
> > files in the source and binary distributions.  There's
> > probably some room for generalization, but this seems like a
> > reasonable start.  (Currently there's not good way to hook in
> > at this level short of modifying the plugin.jelly file, afaik)
> >
> > - Rod <http://radio.weblogs.com/0122027/>
> >
>

-- 
- Rod <http://radio.weblogs.com/0122027/>

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


RE: [PATCH] use CRLF for text files in *.zip, LF for text files i n *.tar.gz

Posted by Martin Skopp <sk...@riege.com>.
On Mon, 2003-11-03 at 22:22, Brett Porter wrote:
> I don't believe in this assumption, as I have in the past (although
> reluctantly) used .zip on Unix, and I just about always use .tar.gz on
> Windows via cygwin.

Together with the fact that line endings of the cvs checkout on a local
machine are OS dependent, it means that line endings in distribution
files depend upon the OS of the developer who builds the distribution
files.

IMHO this is worse than the mixed usage of one using .zip on Unix and
.tgz on W32, and there's still Jasons argument that one can use "unzip
-a filename"...

Imaging today a W32 developer published the dist and tomorrow a Unix
developer publishes a newer dist with different line endings - confusing
for a users who uses the source-dist, isn't it?

So I am +1 on the patch, but I am not a committer, possibly my opinion
does not could...

cu
-- 
Martin Skopp
Riege Software International GmbH
Support: mailto:maint@riege.com, Information: http://www.riege.com
 
This email is intended to be viewed with a nonproportional font.
Public Key on http://www.keyserver.net, Key-ID: 3D4027B5
Fingerprint: 1970 C78D 9A1D 99FA 5CE4  5C0D 29E6 6A95 3D40 27B5



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