You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by js...@apache.org on 2005/12/07 00:47:28 UTC
svn commit: r354618 - /geronimo/trunk/modules/assembly/maven.xml
Author: jsisson
Date: Tue Dec 6 15:47:15 2005
New Revision: 354618
URL: http://svn.apache.org/viewcvs?rev=354618&view=rev
Log:
GERONIMO-1286 Have CRLF line endings for zip distribution and LF line endings for tar.gz distribution (still up for debate.. see JIRA)
Modified:
geronimo/trunk/modules/assembly/maven.xml
Modified: geronimo/trunk/modules/assembly/maven.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/maven.xml?rev=354618&r1=354617&r2=354618&view=diff
==============================================================================
--- geronimo/trunk/modules/assembly/maven.xml (original)
+++ geronimo/trunk/modules/assembly/maven.xml Tue Dec 6 15:47:15 2005
@@ -697,19 +697,53 @@
<m:makeRelativePath var="geronimo.assembly.dir.name"
basedir="${geronimo.assembly.dir}/.."
path="${geronimo.assembly.dir}"/>
- <!--fixcrlf processing needed so:
- 1. Shell scripts only have LFs, as CRs cause the scripts to abort
- and the CRs also appear as ^M in editors such as vi.
- 2. Batch files on windows should contain CRLFs so they are editable
- using notepad (the default editor in Windows) -->
- <ant:fixcrlf srcdir="${geronimo.assembly.dir}/.."
- includes="${geronimo.assembly.dir.name}/bin/*.sh" eol="lf" />
- <ant:fixcrlf srcdir="${geronimo.assembly.dir}/.."
- includes="${geronimo.assembly.dir.name}/bin/*.bat" eol="crlf" />
- <!-- build a tar.gz file ensuring execute permission is set for
- shell script files on the tar task so it works on windows -->
+ <!-- Establish patternset used by later fixcrlf processing -->
+ <ant:fileset dir="${geronimo.assembly.dir}" >
+ <ant:patternset id="geronimo.fixcrlf.patternset">
+ <ant:include name="**/*.bat" />
+ <ant:include name="**/*.dtd" />
+ <ant:include name="**/*.properties" />
+ <ant:include name="**/*.sh" />
+ <ant:include name="**/*.txt" />
+ <ant:include name="**/*.xml" />
+ <ant:include name="**/*.xsd" />
+ <ant:include name="STATUS" />
+ </ant:patternset>
+ </ant:fileset>
+
+ <!-- Create the zip distribution -->
+ <j:if test="${context.getVariable('geronimo.assembly.zip') == 'true'}">
+ <ant:echo>Preparing CRLF line endings in text based files for zip distribution</ant:echo>
+ <!-- The zip distribution shall have CRLF line endings and is
+ targeted at Windows platforms. Non-Windows platforms should
+ use the tar distribution, as it contains extra file attributes
+ such as permissions.
+ Since we cannot assume we are running on a Windows platform,
+ we fix line endings in the zip distribution to be LF's. -->
+ <ant:fixcrlf srcdir="${geronimo.assembly.dir}" eol="crlf">
+ <patternset refid="geronimo.fixcrlf.patternset"/>
+ </ant:fixcrlf>
+
+ <ant:zip zipfile="${geronimo.assembly.distributions.dir}/${maven.final.name}.zip">
+ <ant:zipfileset dir="${geronimo.assembly.dir}/..">
+ <ant:include name="${geronimo.assembly.dir.name}/**"/>
+ <ant:exclude name="${geronimo.assembly.dir.name}/**/var/log/*.log"/>
+ </ant:zipfileset>
+ </ant:zip>
+ <checksum file="${geronimo.assembly.distributions.dir}/${maven.final.name}.zip" algorithm="MD5" fileext=".md5"/>
+ <checksum file="${geronimo.assembly.distributions.dir}/${maven.final.name}.zip" algorithm="SHA" fileext=".sha"/>
+ </j:if>
+
+ <!-- Create the tar.gz distribution -->
<j:if test="${context.getVariable('geronimo.assembly.tar') == 'true'}">
+ <!-- Since we cannot assume we are running on a UNIX platform,
+ fix line endings in the tar distribution to be LF's. -->
+ <ant:echo>Preparing CRLF line endings in text based files for tar.gz distribution</ant:echo>
+ <ant:fixcrlf srcdir="${geronimo.assembly.dir.name}" eol="lf">
+ <patternset refid="geronimo.fixcrlf.patternset"/>
+ </ant:fixcrlf>
+
<ant:tar longfile="gnu" compression="gzip" tarfile="${geronimo.assembly.distributions.dir}/${maven.final.name}.tar.gz">
<ant:tarfileset dir="${geronimo.assembly.dir}/..">
<ant:include name="${geronimo.assembly.dir.name}/**"/>
@@ -723,17 +757,16 @@
<checksum file="${geronimo.assembly.distributions.dir}/${maven.final.name}.tar.gz" algorithm="SHA" fileext=".sha"/>
</j:if>
- <!-- Create a zip file -->
+ <!-- Ensure the files in the assembly directory are left with LF endings
+ for Geronimo developers who may run Geronimo from there. -->
<j:if test="${context.getVariable('geronimo.assembly.zip') == 'true'}">
- <ant:zip zipfile="${geronimo.assembly.distributions.dir}/${maven.final.name}.zip">
- <ant:zipfileset dir="${geronimo.assembly.dir}/..">
- <ant:include name="${geronimo.assembly.dir.name}/**"/>
- <ant:exclude name="${geronimo.assembly.dir.name}/**/var/log/*.log"/>
- </ant:zipfileset>
- </ant:zip>
- <checksum file="${geronimo.assembly.distributions.dir}/${maven.final.name}.zip" algorithm="MD5" fileext=".md5"/>
- <checksum file="${geronimo.assembly.distributions.dir}/${maven.final.name}.zip" algorithm="SHA" fileext=".sha"/>
+ <j:if test="${context.getVariable('geronimo.assembly.tar') != 'true'}">
+ <ant:fixcrlf srcdir="${geronimo.assembly.dir}" eol="lf">
+ <patternset refid="geronimo.fixcrlf.patternset"/>
+ </ant:fixcrlf>
+ </j:if>
</j:if>
+
</goal>
<!-- ================================================================== -->