MAVEN-789 from Berin L.

Rev'd version to 1.3.


git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113962 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
werken 2003-09-05 15:14:20 +00:00
parent ac6c7f95ee
commit fec75d6506
2 changed files with 33 additions and 3 deletions

View File

@ -7,7 +7,8 @@
xmlns:maven="jelly:maven"
xmlns:deploy="deploy"
xmlns:util="jelly:util"
xmlns:doc="doc">
xmlns:doc="doc"
xmlns:log="jelly:log">
<!-- ================================================================== -->
<!-- J A R -->
@ -70,7 +71,6 @@
<ant:attribute name="Extension-List" value="${extensionList}"/>
</j:if>
<j:forEach var="artifact" items="${pom.artifacts}">
<j:set var="dep" value="${artifact.dependency}"/>
<ant:attribute name="${dep.artifactId}-Extension-Name" value="${dep.artifactId}"/>
@ -78,6 +78,36 @@
<ant:attribute name="${dep.artifactId}-Implementation-URL" value="http://www.ibiblio.org/maven${artifact.urlPath}"/>
</j:forEach>
</j:if>
<j:if test="${context.getVariable('maven.jar.manifest.attributes.list') != null}">
<util:tokenize var="attributeList" delim="," trim="true">${maven.jar.manifest.attributes.list}</util:tokenize>
<j:forEach var="attribute" items="${attributeList}">
<j:set var="name" value="maven.jar.manifest.attribute.${attribute}"/>
<j:set var="value" value="${context.findVariable(name)}"/>
<log:debug>[user attribute] ${attribute}: ${value}</log:debug>
<ant:attribute name="${attribute}" value="${value}"/>
</j:forEach>
</j:if>
<j:if test="${context.getVariable('maven.jar.manifest.groups.list') != null}">
<util:tokenize var="groupList" delim="," trim="true">${maven.jar.manifest.groups.list}</util:tokenize>
<j:forEach var="group" items="${groupList}">
<j:set var="nameVar" value="maven.jar.manifest.${group}.name"/>
<j:set var="groupName" value="${context.findVariable(nameVar)}"/>
<j:set var="attributeListVar" value="maven.jar.manifest.${group}.attributes.list"/>
<j:set var="groupAttributes" value="${context.findVariable(attributeListVar)}"/>
<util:tokenize var="attributeList" delim="," trim="true">${groupAttributes}</util:tokenize>
<log:debug>[group] Name: ${groupName}</log:debug>
<ant:section name="${groupName}">
<j:forEach var="attribute" items="${attributeList}">
<j:set var="name" value="maven.jar.manifest.${group}.attribute.${attribute}"/>
<j:set var="value" value="${context.findVariable(name)}"/>
<log:debug>[attribute] ${attribute}: ${value}</log:debug>
<ant:attribute name="${attribute}" value="${value}"/>
</j:forEach>
</ant:section>
</j:forEach>
</j:if>
</ant:manifest>
</ant:jar>
</goal>

View File

@ -5,7 +5,7 @@
<pomVersion>3</pomVersion>
<id>maven-jar-plugin</id>
<name>Maven Jar Plug-in</name>
<currentVersion>1.2-SNAPSHOT</currentVersion>
<currentVersion>1.3</currentVersion>
<description/>
<shortDescription>Java Project Management Tools</shortDescription>
<url>http://maven.apache.org/reference/plugins/jar/</url>