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:[EMAIL PROTECTED]
> > Sent: Tuesday, 4 November 2003 7:01 AM
> > To: [EMAIL PROTECTED]
> > 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to