PR: MPDIST-26

Allow distribution of artifact types other than jar.
New property maven.dist.bin.artifact.type, deprecated property maven.dist.bin.artifact.


git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@413190 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
ltheussl 2006-06-09 23:11:57 +00:00
parent 4afa7e80fe
commit ed9e0c3b68
4 changed files with 41 additions and 3 deletions

25
dist/plugin.jelly vendored
View File

@ -34,7 +34,6 @@
<goal <goal
name="dist:prepare-bin-filesystem" name="dist:prepare-bin-filesystem"
prereqs="jar:jar"
description="Builds the binary distribution file system."> description="Builds the binary distribution file system.">
<!-- <!--
@ -61,6 +60,30 @@
</ant:fileset> </ant:fileset>
</ant:copy> </ant:copy>
<j:set var="binArtifactType" value="${maven.dist.bin.artifact.type}"/>
<j:choose>
<j:when test="${binArtifactType == 'rar'}">
<attainGoal name="rar:rar"/>
<j:set var="maven.dist.bin.artifact" value="${maven.rar.final.name}"/>
</j:when>
<j:when test="${binArtifactType == 'ear'}">
<attainGoal name="ear:ear"/>
<j:set var="maven.dist.bin.artifact" value="${maven.ear.final.name}"/>
</j:when>
<j:when test="${binArtifactType == 'war'}">
<attainGoal name="war:war"/>
<j:set var="maven.dist.bin.artifact" value="${maven.war.final.name}"/>
</j:when>
<j:when test="${binArtifactType == 'ejb'}">
<attainGoal name="ejb:ejb"/>
<j:set var="maven.dist.bin.artifact" value="${maven.ejb.final.name}"/>
</j:when>
<j:otherwise>
<attainGoal name="jar:jar"/>
<j:set var="maven.dist.bin.artifact" value="${maven.jar.final.name}"/>
</j:otherwise>
</j:choose>
<!-- Copy artifact --> <!-- Copy artifact -->
<ant:copy todir="${maven.dist.bin.assembly.dir}"> <ant:copy todir="${maven.dist.bin.assembly.dir}">
<ant:fileset dir="${maven.build.dir}"> <ant:fileset dir="${maven.build.dir}">

View File

@ -26,7 +26,8 @@ maven.dist.src.archive.dir=${maven.dist.assembly.dir}/src
maven.dist.bin.assembly.dir=${maven.dist.assembly.dir}/bin/${maven.final.name} 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.src.assembly.dir=${maven.dist.assembly.dir}/src/${maven.final.name}
maven.dist.dir=${maven.build.dir}/distributions maven.dist.dir=${maven.build.dir}/distributions
maven.dist.bin.artifact=${maven.final.name}.jar #maven.dist.bin.artifact=${maven.final.name}.jar
maven.dist.crlf.filter=**/*.txt maven.dist.crlf.filter=**/*.txt
maven.dist.lf.filter= maven.dist.lf.filter=
maven.dist.bin.include.site=true maven.dist.bin.include.site=true
maven.dist.bin.artifact.type=jar

View File

@ -25,6 +25,7 @@
</properties> </properties>
<body> <body>
<release version="1.7-SNAPSHOT" date="in SVN"> <release version="1.7-SNAPSHOT" date="in SVN">
<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="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> <action dev="ltheussl" type="fix" issue="MPDIST-12">build-src goal does not use <code>pom.build.sourceDirectory</code>.</action>
<action dev="aheritier" type="update">Fix compatibility with the version of ant plugin newer or equal to 1.10.</action> <action dev="aheritier" type="update">Fix compatibility with the version of ant plugin newer or equal to 1.10.</action>

View File

@ -65,7 +65,20 @@
<tr> <tr>
<td>maven.dist.bin.artifact</td> <td>maven.dist.bin.artifact</td>
<td>yes - default is <code>${maven.final.name}.jar</code>.</td> <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> <td>
<strong>DEPRECATED</strong>: this property is not used anymore.
The name of the binary artifact depends on its type
and is given by
<code>${maven.[jar,ear,rar,war,ejb].final.name}</code>.
</td>
</tr>
<tr>
<td>maven.dist.bin.artifact.type</td>
<td>yes - default is <code>jar</code>.</td>
<td>
The type of artifact to be included in the binary distribution.
Possible values are jar, rar, war, ear and ejb.
</td>
</tr> </tr>
<tr> <tr>
<td>maven.dist.bin.include.site</td> <td>maven.dist.bin.include.site</td>