mirror of https://github.com/apache/maven.git
Resolving: MNG-842
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@290572 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
abdfbe1c74
commit
554dd0b525
|
@ -40,14 +40,14 @@
|
|||
</distributionManagement>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:file://localhost/${project.file.parentFile.parentFile}/target/svnroot/project/trunk</connection>
|
||||
<developerConnection>scm:svn:file://localhost/${project.file.parentFile.parentFile}/target/svnroot/project/trunk</developerConnection>
|
||||
<url>file://localhost/${project.file.parentFile.parentFile}/target/svnroot/project/trunk</url>
|
||||
<connection>scm:svn:file://localhost/${project.file.parentFile.parentFile}/target/svnroot/trunk/project</connection>
|
||||
<developerConnection>scm:svn:file://localhost/${project.file.parentFile.parentFile}/target/svnroot/trunk/project</developerConnection>
|
||||
<url>file://localhost/${project.file.parentFile.parentFile}/target/svnroot/trunk/project</url>
|
||||
<tag>p1</tag>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
<tagBase>file://localhost/${project.file.parentFile.parentFile}/target/svnroot/project/tags</tagBase>
|
||||
<tagBase>file://localhost/${project.file.parentFile.parentFile}/target/svnroot/tags</tagBase>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
|
|
|
@ -23,6 +23,9 @@ import org.apache.maven.plugin.MojoExecutionException;
|
|||
import org.apache.maven.project.MavenProject;
|
||||
import org.codehaus.plexus.util.StringUtils;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class ProjectScmRewriter
|
||||
{
|
||||
private ReleaseProgressTracker releaseProgress;
|
||||
|
@ -87,9 +90,23 @@ public class ProjectScmRewriter
|
|||
|
||||
private String convertSvnConnectionString( String scmConnection, String tag )
|
||||
{
|
||||
if ( scmConnection.indexOf( "/trunk" ) >= 0 )
|
||||
int trunkBegin = scmConnection.indexOf( "/trunk" );
|
||||
|
||||
if ( trunkBegin >= 0 )
|
||||
{
|
||||
scmConnection = StringUtils.replace( scmConnection, "/trunk", "/tags/" + tag );
|
||||
String tail = "";
|
||||
|
||||
if ( scmConnection.length() > trunkBegin + "/trunk".length() )
|
||||
{
|
||||
tail = scmConnection.substring( trunkBegin + "/trunk".length() );
|
||||
|
||||
if ( !tail.startsWith( "/" ) )
|
||||
{
|
||||
tail += "/";
|
||||
}
|
||||
}
|
||||
|
||||
scmConnection = scmConnection.substring( 0, trunkBegin ) + "/tags/" + tag + tail;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue