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/>
Index: dist/plugin.jelly
===================================================================
RCS file: /home/cvspublic/maven-plugins/dist/plugin.jelly,v
retrieving revision 1.11
diff -u -r1.11 plugin.jelly
--- dist/plugin.jelly   16 Oct 2003 08:46:34 -0000      1.11
+++ dist/plugin.jelly   3 Nov 2003 19:56:51 -0000
@@ -128,6 +128,11 @@
     prereqs="dist:build-setup,dist:prepare-bin-filesystem"
     description="Build the binary distribution.">
 
+    <!-- ensure that the tag.gz file uses unix line endings for text files -->
+    <ant:fixcrlf srcdir="${maven.dist.bin.archive.dir}" eol="lf" includes="**/*.txt"/>
+    <ant:fixcrlf srcdir="${maven.dist.bin.archive.dir}" eol="lf" includes="**/*.xml"/>
+    <ant:fixcrlf srcdir="${maven.dist.bin.archive.dir}" eol="lf" 
includes="**/*.properties"/>
+    
     <!-- Create a tar.gz file -->
     <ant:tar longfile="gnu" tarfile="${maven.dist.dir}/${maven.final.name}.tar">
       <ant:tarfileset dir="${maven.dist.bin.archive.dir}"/>
@@ -139,6 +144,11 @@
     />
     
     <ant:delete file="${maven.dist.dir}/${maven.final.name}.tar"/>
+    
+    <!-- ensure that the tag.gz file uses unix line endings for text files -->
+    <ant:fixcrlf srcdir="${maven.dist.bin.archive.dir}" eol="crlf" 
includes="**/*.txt"/>
+    <ant:fixcrlf srcdir="${maven.dist.bin.archive.dir}" eol="crlf" 
includes="**/*.xml"/>
+    <ant:fixcrlf srcdir="${maven.dist.bin.archive.dir}" eol="crlf" 
includes="**/*.properties"/>
 
     <!-- Create a zip file -->
     <ant:zip zipfile="${maven.dist.dir}/${maven.final.name}.zip">
@@ -151,6 +161,11 @@
     prereqs="dist:build-setup,dist:prepare-src-filesystem"
     description="Build the source distribution.">
  
+    <!-- ensure that the tag.gz file uses unix line endings for text files -->
+    <ant:fixcrlf srcdir="${maven.dist.src.archive.dir}" eol="lf" includes="**/*.txt"/>
+    <ant:fixcrlf srcdir="${maven.dist.src.archive.dir}" eol="lf" includes="**/*.xml"/>
+    <ant:fixcrlf srcdir="${maven.dist.src.archive.dir}" eol="lf" 
includes="**/*.properties"/>
+
     <!-- Create a tar.gz file -->
     <ant:tar longfile="gnu" tarfile="${maven.dist.dir}/${maven.final.name}-src.tar">
       <ant:tarfileset dir="${maven.dist.src.archive.dir}"/>
@@ -163,6 +178,11 @@
     
     <ant:delete file="${maven.dist.dir}/${maven.final.name}-src.tar"/>
 
+    <!-- ensure that the zip file uses dos line endings for text files -->
+    <ant:fixcrlf srcdir="${maven.dist.src.archive.dir}" eol="crlf" 
includes="**/*.txt"/>
+    <ant:fixcrlf srcdir="${maven.dist.src.archive.dir}" eol="crlf" 
includes="**/*.xml"/>
+    <ant:fixcrlf srcdir="${maven.dist.src.archive.dir}" eol="crlf" 
includes="**/*.properties"/>
+    
     <!-- Create a zip file -->
     <ant:zip zipfile="${maven.dist.dir}/${maven.final.name}-src.zip">
       <ant:zipfileset dir="${maven.dist.src.archive.dir}"/>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to