You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Lukas Theussl (JIRA)" <ji...@codehaus.org> on 2011/01/05 11:29:58 UTC

[jira] Created: (MCHANGES-218) Downloading from JIRA fails if issueManagement.url has trailing slash

Downloading from JIRA fails if issueManagement.url has trailing slash
---------------------------------------------------------------------

                 Key: MCHANGES-218
                 URL: http://jira.codehaus.org/browse/MCHANGES-218
             Project: Maven 2.x Changes Plugin
          Issue Type: Bug
          Components: jira
    Affects Versions: 2.3
            Reporter: Lukas Theussl


With an issueManagement.url like http://jira.codehaus.org/browse/DOXIA/ (note trailing slash), the jira report chokes

{noformat}
[WARNING] Downloading from JIRA failed. Received: [404]
{noformat}

and an empty report is generated. removing the trailing slash makes it work.

-- 
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
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MCHANGES-218) Downloading from JIRA fails if issueManagement.url has trailing slash

Posted by "Cristian Lupu (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MCHANGES-218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=290911#comment-290911 ] 

Cristian Lupu commented on MCHANGES-218:
----------------------------------------

I would create a unit test to test this method, getJiraUrlAndProjectId from JiraHelper class before trying to fix it again. And run it with different values for issueManagementUrl:

http://jira.codehaus.org/browse/DOXIA/
http://jira.codehaus.org/
http://jira.codehaus.org
http://jira.codehaus.org/browse/DOXIA

and then try to fix it


                
> Downloading from JIRA fails if issueManagement.url has trailing slash
> ---------------------------------------------------------------------
>
>                 Key: MCHANGES-218
>                 URL: https://jira.codehaus.org/browse/MCHANGES-218
>             Project: Maven 2.x Changes Plugin
>          Issue Type: Bug
>          Components: jira
>    Affects Versions: 2.3
>            Reporter: Lukas Theussl
>            Assignee: Lukas Theussl
>             Fix For: 2.4
>
>
> With an issueManagement.url like http://jira.codehaus.org/browse/DOXIA/ (note trailing slash), the jira report chokes
> {noformat}
> [WARNING] Downloading from JIRA failed. Received: [404]
> {noformat}
> and an empty report is generated. removing the trailing slash makes it work.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MCHANGES-218) Downloading from JIRA fails if issueManagement.url has trailing slash

Posted by "Cristian Lupu (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MCHANGES-218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=290908#comment-290908 ] 

Cristian Lupu commented on MCHANGES-218:
----------------------------------------

This fix doesn't work for the case when url is set to a value like "http://jira.codehaus.org/"
Because it will remove the last "/" and few lines below it tries to extract url again based on the last index for "/" and the url extracted in that case is "http:/"

54          if ( url.endsWith( "/" ) )
55          {
56              // MCHANGES-218
57              url = url.substring( 0, url.lastIndexOf( '/' ) );
58          }
.....................
72          String jiraUrl = url.substring( 0, url.lastIndexOf( '/' ) );

Easy to test with a quick unit test and a different value for issueManagementUrl:
Map<String, String> jiraUrlAndProjectId = getJiraUrlAndProjectId("http://jira.codehaus.org/");
assertEquals("http://jira.codehaus.org", jiraUrlAndProjectId.get("url"));





                
> Downloading from JIRA fails if issueManagement.url has trailing slash
> ---------------------------------------------------------------------
>
>                 Key: MCHANGES-218
>                 URL: https://jira.codehaus.org/browse/MCHANGES-218
>             Project: Maven 2.x Changes Plugin
>          Issue Type: Bug
>          Components: jira
>    Affects Versions: 2.3
>            Reporter: Lukas Theussl
>            Assignee: Lukas Theussl
>             Fix For: 2.4
>
>
> With an issueManagement.url like http://jira.codehaus.org/browse/DOXIA/ (note trailing slash), the jira report chokes
> {noformat}
> [WARNING] Downloading from JIRA failed. Received: [404]
> {noformat}
> and an empty report is generated. removing the trailing slash makes it work.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MCHANGES-218) Downloading from JIRA fails if issueManagement.url has trailing slash

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MCHANGES-218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=250587#action_250587 ] 

Dennis Lundberg commented on MCHANGES-218:
------------------------------------------

This is a known limitation that is  somewhat documented in the "Linking to Your Issue Management System" section at http://maven.apache.org/plugins/maven-changes-plugin/usage.html
The documentation is of course in the wrong place for your use case.

I'll take a look and see if I can try to fix the parsing routine. If now at least the docs should be improved to highlight this better.

> Downloading from JIRA fails if issueManagement.url has trailing slash
> ---------------------------------------------------------------------
>
>                 Key: MCHANGES-218
>                 URL: http://jira.codehaus.org/browse/MCHANGES-218
>             Project: Maven 2.x Changes Plugin
>          Issue Type: Bug
>          Components: jira
>    Affects Versions: 2.3
>            Reporter: Lukas Theussl
>
> With an issueManagement.url like http://jira.codehaus.org/browse/DOXIA/ (note trailing slash), the jira report chokes
> {noformat}
> [WARNING] Downloading from JIRA failed. Received: [404]
> {noformat}
> and an empty report is generated. removing the trailing slash makes it work.

-- 
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
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (MCHANGES-218) Downloading from JIRA fails if issueManagement.url has trailing slash

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MCHANGES-218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukas Theussl closed MCHANGES-218.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.4
         Assignee: Lukas Theussl

Hacked it out: [r1055775|http://svn.apache.org/viewvc?rev=1055775&view=rev]

> Downloading from JIRA fails if issueManagement.url has trailing slash
> ---------------------------------------------------------------------
>
>                 Key: MCHANGES-218
>                 URL: http://jira.codehaus.org/browse/MCHANGES-218
>             Project: Maven 2.x Changes Plugin
>          Issue Type: Bug
>          Components: jira
>    Affects Versions: 2.3
>            Reporter: Lukas Theussl
>            Assignee: Lukas Theussl
>             Fix For: 2.4
>
>
> With an issueManagement.url like http://jira.codehaus.org/browse/DOXIA/ (note trailing slash), the jira report chokes
> {noformat}
> [WARNING] Downloading from JIRA failed. Received: [404]
> {noformat}
> and an empty report is generated. removing the trailing slash makes it work.

-- 
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
-
For more information on JIRA, see: http://www.atlassian.com/software/jira