Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0
-
None
-
Patch
Description
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.