You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by ji...@codehaus.org on 2004/06/14 06:44:05 UTC

[jira] Commented: (MPCHANGELOG-43) Patch for changelog.jsl

The following comment has been added to this issue:

     Author: Rafael Santiago, Jr.
    Created: Mon, 14 Jun 2004 12:43 AM
       Body:
Woops, meant to say that the quick fix is to set "pom.repository.url" in your build.properties as well.
---------------------------------------------------------------------
View this comment:
  http://jira.codehaus.org/browse/MPCHANGELOG-43?page=comments#action_20615

---------------------------------------------------------------------
View the issue:
  http://jira.codehaus.org/browse/MPCHANGELOG-43

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: MPCHANGELOG-43
    Summary: Patch for changelog.jsl
       Type: Improvement

     Status: Unassigned
   Priority: Trivial

 Original Estimate: Unknown
 Time Spent: Unknown
  Remaining: Unknown

    Project: maven-changelog-plugin
   Versions:
             1.5

   Assignee: 
   Reporter: Rafael Santiago, Jr.

    Created: Mon, 14 Jun 2004 12:41 AM
    Updated: Mon, 14 Jun 2004 12:43 AM
Environment: Fedora Core 2 

Description:
--- 
If you do not add a <repository/> tag in project.xml but instead try to add "pom.repository.connection" to your build.properties, the plugin throws up a "java.lang.Exception: Null comparison". This is because "pom.repository.url" is null. The quick fix is to set "pom.repository.url" in your pom as well. In changelog.jsl there should be a check of "pom.repository.url" to make sure it's not null before operating on it.

Here's the patch:
======================================================================
/home/rsanti01/src/maven-plugins/changelog/src/plugin-resources/changelog.jsl	2004-04-20 20:55:43.000000000 -0400
+++ /home/rsanti01/Projects/maven-stuff/changelog.jsl	2004-06-12 01:13:02.000000000 -0400
@@ -71,7 +71,7 @@
                     <j:set var="revision"><x:expr select="$file/revision"/></j:set>
                     <j:set var="repositoryUrl" value="${pom.repository.url}"/>
                     <j:choose>
-                      <j:when test="${repositoryUrl.indexOf('?')>0}">
+                      <j:when test="${!empty(repositoryUrl)} and ${repositoryUrl.indexOf('?')>0}">
                         <j:set var="repository" value="${repositoryUrl.substring(0, repositoryUrl.indexOf('?'))}"/>
                         <j:set var="tmpMultiRepoParam" value="${repositoryUrl.substring(repository.length())}"/>
                         <j:set var="oneRepoParam" value="?${tmpMultiRepoParam.substring(1)}"/>



---------------------------------------------------------------------
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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org