PR: MPDIST-17

New property maven.dist.formats to allow creation of only zip or tar.gz archives.


git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@413193 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
ltheussl 2006-06-09 23:44:08 +00:00
parent ed9e0c3b68
commit 6c89a1087a
4 changed files with 152 additions and 103 deletions

43
dist/plugin.jelly vendored
View File

@ -190,6 +190,11 @@
prereqs="dist:build-setup,dist:prepare-bin-filesystem"
description="Build the binary distribution.">
<util:tokenize var="distFormats" delim="," trim="true">${maven.dist.formats}</util:tokenize>
<j:forEach var="distFormat" items="${distFormats}">
<j:if test="${distFormat == 'tgz'}">
<!-- Use LF line endings for specified files if lf filter
is set -->
<j:if test="${lfFilter.length() > 0}">
@ -208,7 +213,9 @@
/>
<ant:delete file="${maven.dist.dir}/${maven.final.name}.tar"/>
</j:if>
<j:if test="${distFormat == 'zip'}">
<!-- Use CRLF line endings for specified files in zip if crlf filter
is set -->
<j:if test="${crlfFilter.length() > 0}">
@ -220,6 +227,10 @@
<ant:zip zipfile="${maven.dist.dir}/${maven.final.name}.zip">
<ant:zipfileset dir="${maven.dist.bin.archive.dir}"/>
</ant:zip>
</j:if>
</j:forEach>
</goal>
<goal
@ -227,6 +238,11 @@
prereqs="dist:build-setup,dist:prepare-src-filesystem"
description="Build the source distribution.">
<util:tokenize var="distFormats" delim="," trim="true">${maven.dist.formats}</util:tokenize>
<j:forEach var="distFormat" items="${distFormats}">
<j:if test="${distFormat == 'tgz'}">
<!-- Use LF line endings for specified files in unix distros if lf filter
is set -->
<j:if test="${lfFilter.length() > 0}">
@ -245,7 +261,9 @@
/>
<ant:delete file="${maven.dist.dir}/${maven.final.name}-src.tar"/>
</j:if>
<j:if test="${distFormat == 'zip'}">
<!-- Use CRLF line endings for text files in zip archive if crlf filter
is set -->
<j:if test="${crlfFilter.length() > 0}">
@ -257,6 +275,8 @@
<ant:zip zipfile="${maven.dist.dir}/${maven.final.name}-src.zip">
<ant:zipfileset dir="${maven.dist.src.archive.dir}"/>
</ant:zip>
</j:if>
</j:forEach>
</goal>
@ -494,6 +514,11 @@
</classpath>
</javadoc>
<util:tokenize var="distFormats" delim="," trim="true">${maven.dist.formats}</util:tokenize>
<j:forEach var="distFormat" items="${distFormats}">
<j:if test="${distFormat == 'tgz'}">
<ant:echo>
+---------------------------------------------+
| C R E A T I N G B I N A R Y T A R B A L L |
@ -510,7 +535,9 @@
/>
<ant:delete file="${maven.dist.dir}/${maven.final.name}.tar"/>
</j:if>
<j:if test="${distFormat == 'zip'}">
<ant:echo>
+----------------------------------------------+
| C R E A T I N G B I N A R Y Z I P F I L E |
@ -521,6 +548,10 @@
<ant:zip zipfile="${maven.dist.dir}/${maven.final.name}.zip">
<ant:zipfileset dir="${maven.dist.bin.archive.dir}"/>
</ant:zip>
</j:if>
</j:forEach>
</goal>
@ -562,8 +593,12 @@
</ant:fileset>
</ant:copy>
<ant:echo>
<util:tokenize var="distFormats" delim="," trim="true">${maven.dist.formats}</util:tokenize>
<j:forEach var="distFormat" items="${distFormats}">
<j:if test="${distFormat == 'tgz'}">
<ant:echo>
+---------------------------------------------+
| C R E A T I N G S O U R C E T A R B A L L |
+---------------------------------------------+
@ -577,9 +612,10 @@
zipfile="${maven.dist.dir}/${maven.final.name}-src.tar.gz"
src="${maven.dist.dir}/${maven.final.name}-src.tar"
/>
<ant:delete file="${maven.dist.dir}/${maven.final.name}-src.tar"/>
</j:if>
<j:if test="${distFormat == 'zip'}">
<ant:echo>
+----------------------------------------------+
| C R E A T I N G S O U R C E Z I P F I L E |
@ -590,6 +626,9 @@
<ant:zip zipfile="${maven.dist.dir}/${maven.final.name}-src.zip">
<ant:zipfileset dir="${maven.dist.src.archive.dir}"/>
</ant:zip>
</j:if>
</j:forEach>
</goal>
<goal

View File

@ -31,3 +31,4 @@ maven.dist.crlf.filter=**/*.txt
maven.dist.lf.filter=
maven.dist.bin.include.site=true
maven.dist.bin.artifact.type=jar
maven.dist.formats=zip,tgz

View File

@ -25,6 +25,7 @@
</properties>
<body>
<release version="1.7-SNAPSHOT" date="in SVN">
<action dev="ltheussl" type="add" issue="MPDIST-17">New property maven.dist.formats to allow creation of only zip or tar.gz archives.</action>
<action dev="ltheussl" type="add" issue="MPDIST-26">Allow distribution of artifact types other than jar. New property maven.dist.bin.artifact.type, deprecated property maven.dist.bin.artifact.</action>
<action dev="ltheussl" type="add" issue="MPDIST-19">New property <code>maven.dist.bin.include.site</code> to optionally include the site docs in the binary distribution.</action>
<action dev="ltheussl" type="fix" issue="MPDIST-12">build-src goal does not use <code>pom.build.sourceDirectory</code>.</action>

View File

@ -101,6 +101,14 @@
filter, so in zip archives, the crlf filter will take precendence
for files that satisfy both filters.</td>
</tr>
<tr>
<td>maven.dist.formats</td>
<td>yes - default is <code>zip,tgz</code>.</td>
<td>
A comma-separated list of distribution formats to build.
Possible values are tgz and zip.
</td>
</tr>
</table>
</section>
</body>