Issue Details (XML | Word | Printable)

Key: SCM-379
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Vincent Siveton
Reporter: Doron Solomon
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Maven SCM

SCM URL with query transformed incorrectly on release:prepare

Created: 28/May/08 08:35 AM   Updated: 19/Aug/08 07:02 AM
Component/s: maven-scm-provider-svn
Affects Version/s: 1.0
Fix Version/s: 1.1

Time Tracking:
Not Specified

File Attachments: 1. Java Source File SvnTagBranchUtils.java (11 kB)


Complexity: Intermediate
Patch Submitted: Yes


 Description  « Hide
Given the following scm definition:

<scm>
<connection>scm:svn:https://myserver/svn/myproj/pom/trunk</connection>
<developerConnection>scm:svn:https://myserver/svn/myproj/pom/trunk</developerConnection>
<url>https://myserver/plugins/scmsvn/viewcvs.php/pom/trunk?root=myproj</url>
</scm>

Running the release:prepare goal transforms this to the following (in the POM associated to the tag):

<scm>
<connection>scm:svn:https://myserver/svn/myproj/pom/tags/mytag-1</connection>
<developerConnection>scm:svn:https://myserver/svn/myproj/pom/tags/mytag-1</developerConnection>
<url>https://myserver/plugins/scmsvn/viewcvs.php/pom/trunk?root=myproj/tags/mytag-1?root=myproj</url>
</scm>

The <url> element is incorrect, as it is adding the query "?root=myproj" twice. The desired url tag is:

<url>https://myserver/plugins/scmsvn/viewcvs.php/pom/tags/mytag-1?root=myproj</url>

The problem is in the class org.apache.maven.scm.provider.svn.SvnTagBranchUtils (in artifact org.apache.maven.scm:maven-scm-providers-svn). The method resolveUrl is considering the case where the URL contains a query string, but is not removing the query part of the URL before transforming it. The attached java file contains the patched version of this class that I have tested.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Vincent Siveton added a comment - 19/Aug/08 07:02 AM
Fixed in r687028 without your patch.