PR: MPDIST-28
Submitted by: Phil Steitz Reviewed by: aheritier Allow to configure to which files should use CRLF/LF line endings in archives. git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@355268 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
1 parent
0eeaf166c6
commit
5cca92d5c5
3 files changed
+43
-6
No files matched your search
Vendored
+28
-6
@@ -140,6 +140,8 @@
|
||||
description="Set up directories for a distribution build">
|
||||
<ant:delete dir="${maven.dist.dir}"/>
|
||||
<ant:mkdir dir="${maven.dist.dir}"/>
|
||||
<j:set var="lfFilter" value="${maven.dist.lf.filter}"/>
|
||||
<j:set var="crlfFilter" value="${maven.dist.crlf.filter}"/>
|
||||
</goal>
|
||||
|
||||
<goal
|
||||
@@ -147,6 +149,13 @@
|
||||
prereqs="dist:build-setup,dist:prepare-bin-filesystem"
|
||||
description="Build the binary distribution.">
|
||||
|
||||
<!-- Use LF line endings for specified files if lf filter
|
||||
is set -->
|
||||
<j:if test="${lfFilter.length() > 0}">
|
||||
<ant:fixcrlf srcdir="${maven.dist.bin.archive.dir}"
|
||||
eol="lf" includes="${lfFilter}"/>
|
||||
</j:if>
|
||||
|
||||
<!-- 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}"/>
|
||||
@@ -159,9 +168,12 @@
|
||||
|
||||
<ant:delete file="${maven.dist.dir}/${maven.final.name}.tar"/>
|
||||
|
||||
<!-- Use CRLF line endings for text files in zip archive -->
|
||||
<ant:fixcrlf srcdir="${maven.dist.bin.archive.dir}"
|
||||
eol="crlf" includes="**/*.txt"/>
|
||||
<!-- Use CRLF line endings for specified files in zip if crlf filter
|
||||
is set -->
|
||||
<j:if test="${crlfFilter.length() > 0}">
|
||||
<ant:fixcrlf srcdir="${maven.dist.bin.archive.dir}"
|
||||
eol="crlf" includes="${crlfFilter}"/>
|
||||
</j:if>
|
||||
|
||||
<!-- Create a zip file -->
|
||||
<ant:zip zipfile="${maven.dist.dir}/${maven.final.name}.zip">
|
||||
@@ -174,6 +186,13 @@
|
||||
prereqs="dist:build-setup,dist:prepare-src-filesystem"
|
||||
description="Build the source distribution.">
|
||||
|
||||
<!-- Use LF line endings for specified files in unix distros if lf filter
|
||||
is set -->
|
||||
<j:if test="${lfFilter.length() > 0}">
|
||||
<ant:fixcrlf srcdir="${maven.dist.src.archive.dir}"
|
||||
eol="lf" includes="${lfFilter}"/>
|
||||
</j:if>
|
||||
|
||||
<!-- 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}"/>
|
||||
@@ -186,9 +205,12 @@
|
||||
|
||||
<ant:delete file="${maven.dist.dir}/${maven.final.name}-src.tar"/>
|
||||
|
||||
<!-- Use CRLF line endings for text files in zip archive -->
|
||||
<ant:fixcrlf srcdir="${maven.dist.src.archive.dir}"
|
||||
eol="crlf" includes="**/*.txt"/>
|
||||
<!-- Use CRLF line endings for text files in zip archive if crlf filter
|
||||
is set -->
|
||||
<j:if test="${crlfFilter.length() > 0}">
|
||||
<ant:fixcrlf srcdir="${maven.dist.src.archive.dir}"
|
||||
eol="crlf" includes="${crlfFilter}"/>
|
||||
</j:if>
|
||||
|
||||
<!-- Create a zip file -->
|
||||
<ant:zip zipfile="${maven.dist.dir}/${maven.final.name}-src.zip">
|
||||
|
||||
Vendored
+2
@@ -27,3 +27,5 @@ maven.dist.bin.assembly.dir=${maven.dist.assembly.dir}/bin/${maven.final.name}
|
||||
maven.dist.src.assembly.dir=${maven.dist.assembly.dir}/src/${maven.final.name}
|
||||
maven.dist.dir=${maven.build.dir}/distributions
|
||||
maven.dist.bin.artifact=${maven.final.name}.jar
|
||||
maven.dist.crlf.filter=**/*.txt
|
||||
maven.dist.lf.filter=
|
||||
Vendored
+13
@@ -62,6 +62,19 @@
|
||||
<td>yes - default is <code>${maven.final.name}.jar</code>.</td>
|
||||
<td>The name of the binary artifact to include in distribution, relative to target dir.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>maven.dist.crlf.filter</td>
|
||||
<td>yes - default is <code>"**/*.txt"</code>.</td>
|
||||
<td>Filter specifying files to convert to CRLF (Windows style) line endings in zip distributions.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>maven.dist.lf.filter</td>
|
||||
<td>yes - default is no filter applied (no change to any files).</td>
|
||||
<td>Filter specifying files to convert to LF line endings in both tar
|
||||
and zip distributions. This filter is applied before the crlf
|
||||
filter, so in zip archives, the crlf filter will take precendence
|
||||
for files that satisfy both filters.</td>
|
||||
</tr>
|
||||
</table>
|
||||
</section>
|
||||
</body>
|
||||
|
||||
Reference in new issue
Block a user