Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Environment:All. Developed on "OS X".
-
Number of attachments :
Description
Following is a patch that fixes the creation of Manifest extention information in 2 ways.
1) Only dependencies of type jar (or implicitly jar) will be included. This means that distributed jars will not specify build-time jars as runtime requirements.
2) Dependency declarations may include an url. If the url is specified then it takes priority over the existing ibiblio/artifactId derived url. If url is not specified then the previous mechanism is used.
Index: plugin.jelly
===================================================================
RCS file: /home/cvspublic/maven-plugins/jar/plugin.jelly,v
retrieving revision 1.30
diff -u -r1.30 plugin.jelly
— plugin.jelly 23 Mar 2004 20:33:59 -0000 1.30
+++ plugin.jelly 30 Mar 2004 22:47:05 -0000
@@ -103,7 +103,9 @@
<j:set var="extensionList" value=""/>
<j:forEach var="artifact" items="${pom.artifacts}">
<j:set var="dep" value="${artifact.dependency}"/>
- <j:set var="extensionList" value="${extensionList} ${dep.artifactId}"/>
+ <j:if test="${dep.type == 'jar' || empty(dep.type)}">
+ <j:set var="extensionList" value="${extensionList} ${dep.artifactId}"/>
+ </j:if>
</j:forEach>
<j:if test="${extensionList.length() != 0}">
@@ -113,9 +115,19 @@
<j:forEach var="artifact" items="${pom.artifacts}">
<j:set var="dep" value="${artifact.dependency}"/>
- <ant:attribute name="${dep.artifactId}-Extension-Name" value="${dep.artifactId}"/>
- <ant:attribute name="${dep.artifactId}-Implementation-Version" value="${dep.version}"/>
- <ant:attribute name="${dep.artifactId}-Implementation-URL" value="http://www.ibiblio.org/maven${artifact.urlPath}"/>
+ <j:if test="${dep.type == 'jar' || empty(dep.type)}">
+ <ant:attribute name="${dep.artifactId}-Extension-Name" value="${dep.artifactId}"/>
+ <ant:attribute name="${dep.artifactId}-Implementation-Version" value="${dep.version}"/>
+
+ <j:choose>
+ <j:when test="${empty(dep.url) || dep.url.toString().trim().length() == 0}">
+ <ant:attribute name="${dep.artifactId}-Implementation-URL" value="http://www.ibiblio.org/maven${artifact.urlPath}"/>
+ </j:when>
+ <j:otherwise>
+ <ant:attribute name="${dep.artifactId}-Implementation-URL" value="${dep.url}"/>
+ </j:otherwise>
+ </j:choose>
+ </j:if>
</j:forEach>
</j:if>
The patch as a file.