The following issue has been updated:

    Updater: Corey Jewett (mailto:[EMAIL PROTECTED])
       Date: Tue, 30 Mar 2004 6:15 PM
    Comment:
The patch as a file.
    Changes:
             Attachment changed to maven-jar-plugin.jelly.patch
    ---------------------------------------------------------------------
For a full history of the issue, see:

  http://jira.codehaus.org/secure/ViewIssue.jspa?key=MPJAR-22&page=history

---------------------------------------------------------------------
View the issue:
  http://jira.codehaus.org/secure/ViewIssue.jspa?key=MPJAR-22

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: MPJAR-22
    Summary: Manifest Extension fixes: Ignore plugin dependencies, allow url override.
       Type: Bug

     Status: Open
   Priority: Major

 Original Estimate: 5 minutes
 Time Spent: Unknown
  Remaining: 5 minutes

    Project: maven-jar-plugin

   Assignee: Jason van Zyl
   Reporter: Corey Jewett

    Created: Tue, 30 Mar 2004 6:13 PM
    Updated: Tue, 30 Mar 2004 6:15 PM
Environment: All. Developed on "OS X".

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>



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to