Author: rich
Date: Thu May 12 15:39:47 2005
New Revision: 169896

URL: http://svn.apache.org/viewcvs?rev=169896&view=rev
Log:
Fix for http://issues.apache.org/jira/browse/BEEHIVE-638 : Readme.txt has 
special characters

This changes all text files in the '.zip' distributions to have CRLF line 
endings, and it changes text files in the 'tar.gz' distributions to have LF 
line endings.  The list of text file extensions is
 as follows:

    bat (in .zip  nly)
    beaninfo
    cmd (in .zip only)
    css
    dtd
    html
    inc
    java
    jcs
    jcx
    jj
    jpf
    jpfs
    js
    jsfb
    jsp
    jspf
    jspx
    jws
    log
    properties
    sql
    tag
    tld
    tldx
    txt
    TXT
    wsdd
    wsdl
    xml
    xsd
    xsdconfig
    xsl
    xslt
 
tests: run.tests against the distributions built from 'ant build.dist.full 
build.test.dist' (linux)
BB: self (WinXP)


Modified:
    incubator/beehive/trunk/distribution.xml

Modified: incubator/beehive/trunk/distribution.xml
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/distribution.xml?rev=169896&r1=169895&r2=169896&view=diff
==============================================================================
--- incubator/beehive/trunk/distribution.xml (original)
+++ incubator/beehive/trunk/distribution.xml Thu May 12 15:39:47 2005
@@ -53,6 +53,11 @@
     <property name="dist.readme.rev.trailer" 
location="${beehive.home}/docs/dist-docs/rev-readme-trailer.txt"/>
     <property name="dist.readme.toplvl.trailer" 
location="${beehive.home}/docs/dist-docs/toplvl-readme-trailer.txt"/>
 
+    <!-- Properties used by the "build.dist*.{tgz,zip}" targets for 
translating end-of-line characters in text files -->
+    <property name="text.file.includes.unix" 
value="**/*.beaninfo,**/*.css,**/*.dtd,**/*.html,**/*.inc,**/*.java,**/*.jcs,**/*.jcx,**/*.jj,**/*.jpf,**/*.jpfs,**/*.js,**/*.jsfb,**/*.jsp,**/*.jspf,**/*.jspx,**/*.jws,**/*.log,**/*.properties,**/*.sql,**/*.tag,**/*.tld,**/*.tldx,**/*.txt,**/*.TXT,**/*.wsdd,**/*.wsdl,**/*.xml,**/*.xsd,**/*.xsdconfig,**/*.xsl,**/*.xslt,**/Global.app"/>
+    <property name="text.file.includes.dos" 
value="**/*.bat,**/*.cmd,${text.file.includes.unix}"/>
+
+
     <!-- identify whether the current OS is win32 -->
     <condition property="isWindows">
         <os family="windows"/>
@@ -109,7 +114,7 @@
                 <fileset file="${dist.readme.toplvl.trailer}"/>
             </concat>
             <!-- make sure we have consistent eol's after the concat, in case 
we get mixtures from the different files -->
-            <fixcrlf srcdir="${dist.base.dir}" includes="README.txt"/>
+            <fixcrlf eol="crlf" srcdir="${dist.base.dir}" 
includes="README.txt"/>
         </sequential>
     </macrodef>
 
@@ -507,13 +512,16 @@
             <replace file="@{readmedir}/@{readme}" token="@BEEHIVE_REV@" 
value="${beehive.rev}"/>
 
             <!-- make sure we have consistent eol's after the concats, in case 
we get mixtures from the different files -->
-            <fixcrlf srcdir="@{readmedir}" includes="@{readme}"/>
+            <fixcrlf eol="crlf" srcdir="@{readmedir}" includes="@{readme}"/>
         </sequential>
     </macrodef>
 
     <target name="build.dist.zip" description="Builds a Beehive distribution 
zipfile">
         <fail unless="beehive.version" message="Could not build distribution 
archive; beehive.version was not specified"/>
 
+        <!-- Change all text files to CRLF line endings. -->
+        <fixcrlf eol="crlf" srcdir="${dist.base.dir}/${dist.name}" 
includes="${text.file.includes.dos}"/>
+
         <mkdir dir="${dist.archives.dir}"/>
         <!-- exclude the docs/*txt files to eliminate redundant readmes, 
notices, licenses, etc. -->
         <zip destfile="${dist.archives.dir}/${dist.name}.zip" 
includes="${dist.name}/**"
@@ -523,6 +531,9 @@
     <target name="build.dist.tgz" description="Builds a Beehive distribution 
tarball (.tar.gz)">
         <fail unless="beehive.version" message="Could not build distribution 
archive; beehive.version was not specified"/>
 
+        <!-- Change all text files to LF line endings. -->
+        <fixcrlf eol="lf" srcdir="${dist.base.dir}/${dist.name}" 
includes="${text.file.includes.unix}"/>
+
         <mkdir dir="${dist.archives.dir}"/>
         <!-- exclude the docs/*txt files to eliminate redundant readmes, 
notices, licenses, etc. -->
         <tar destfile="${dist.archives.dir}/${dist.name}.tar.gz" 
basedir="${dist.base.dir}" includes="${dist.name}/**"
@@ -532,6 +543,9 @@
     <target name="build.dist.lib.tgz" description="Builds a Beehive library 
distribution tarball (.tar.gz)">
         <fail unless="beehive.version" message="Could not build distribution 
archive; beehive.version was not specified"/>
 
+        <!-- Change all text files to LF line endings. -->
+        <fixcrlf eol="lf" srcdir="${dist.base.dir}/${dist.lib.name}" 
includes="${text.file.includes.unix}"/>
+
         <mkdir dir="${dist.archives.dir}"/>
         <tar destfile="${dist.archives.dir}/${dist.lib.name}.tar.gz" 
basedir="${dist.base.dir}" includes="${dist.lib.name}/**" compression="gzip"/>
     </target>
@@ -539,6 +553,9 @@
     <target name="build.dist.lib.zip" description="Builds a Beehive library 
distribution zipfile">
         <fail unless="beehive.version" message="Could not build distribution 
archive; beehive.version was not specified"/>
 
+        <!-- Change all text files to CRLF line endings. -->
+        <fixcrlf eol="crlf" srcdir="${dist.base.dir}/${dist.lib.name}" 
includes="${text.file.includes.dos}"/>
+
         <mkdir dir="${dist.archives.dir}"/>
         <zip destfile="${dist.archives.dir}/${dist.lib.name}.zip" 
includes="${dist.lib.name}/**" basedir="${dist.base.dir}"/>
     </target>
@@ -558,6 +575,9 @@
 
         <fail unless="beehive.version" message="Could not build distribution 
archive; beehive.version was not specified"/>
 
+        <!-- Change all text files to CRLF line endings. -->
+        <fixcrlf eol="crlf" srcdir="${dist.tmp.dir}/${dist.docs.name}" 
includes="${text.file.includes.dos}"/>
+
         <mkdir dir="${dist.archives.dir}"/>
         <zip destfile="${dist.archives.dir}/${dist.docs.name}.zip" 
basedir="${dist.tmp.dir}" includes="${dist.docs.name}/**" />
 
@@ -572,6 +592,9 @@
 
         <fail unless="beehive.version" message="Could not build distribution 
archive; beehive.version was not specified"/>
 
+        <!-- Change all text files to LF line endings. -->
+        <fixcrlf eol="lf" srcdir="${dist.tmp.dir}/${dist.docs.name}" 
includes="${text.file.includes.unix}"/>
+
         <mkdir dir="${dist.archives.dir}"/>
 
         <tar destfile="${dist.archives.dir}/${dist.docs.name}.tar.gz" 
basedir="${dist.tmp.dir}" includes="${dist.docs.name}/**" compression="gzip"/>
@@ -582,12 +605,18 @@
     <target name="build.dist.src.tgz" description="Builds a Beehive source 
distribution tarball (.tar.gz)">
         <fail unless="beehive.version" message="Could not build distribution 
archive; beehive.version was not specified"/>
 
+        <!-- Change all text files to LF line endings. -->
+        <fixcrlf eol="lf" srcdir="${dist.base.dir}/${dist.src.name}" 
includes="${text.file.includes.unix}"/>
+
         <mkdir dir="${dist.archives.dir}"/>
         <tar destfile="${dist.archives.dir}/${dist.src.name}.tar.gz" 
basedir="${dist.base.dir}" includes="${dist.src.name}/**" compression="gzip"/>
     </target>
 
     <target name="build.dist.src.zip" description="Builds a Beehive source 
distribution zipfile">
         <fail unless="beehive.version" message="Could not build distribution 
archive; beehive.version was not specified"/>
+
+        <!-- Change all text files to CRLF line endings. -->
+        <fixcrlf eol="crlf" srcdir="${dist.base.dir}/${dist.src.name}" 
includes="${text.file.includes.dos}"/>
 
         <mkdir dir="${dist.archives.dir}"/>
         <zip destfile="${dist.archives.dir}/${dist.src.name}.zip" 
includes="${dist.src.name}/**" basedir="${dist.base.dir}"/>


Reply via email to