Given the following pom.xml before release:prepare
pom.xml
<scm> <url>https://localhost/svn/elo_na/Entwicklungswerkzeuge/cdi-runner/Produkt/Entwicklung/</url> <developerConnection>scm:svn:https://localhost/svn/elo_na/Entwicklungswerkzeuge/cdi-runner/Produkt/Entwicklung/</developerConnection> </scm> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> <version>2.2</version> <configuration> <tagBase>https://localhost/svn/elo_na/Entwicklungswerkzeuge/cdi-runner/Produkt/Archiv/</tagBase> </configuration> </plugin> </plugins> </build>
the scm/url in pom.xml.tag is computed wrong.
Expected:
<url>https://localhost/svn/elo_na/Entwicklungswerkzeuge/cdi-runner/Produkt/Archiv/cdi-runner-1.2</url>
but pom.xml.tag was after release:prepare:
pom.xml.tag
<scm> <url>https://localhost/svn/elo_na/Archivswerkzeuge/cdi-runner/Produkt/Archiv/cdi-runner-1.2-SNAPSHOT</url> <developerConnection>scm:svn:https://localhost/svn/elo_na/Entwicklungswerkzeuge/cdi-runner/Produkt/Archiv/cdi-runner-1.2-SNAPSHOT</developerConnection> </scm> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> <version>2.2</version> <configuration> <tagBase>https://localhost/svn/elo_na/Entwicklungswerkzeuge/cdi-runner/Produkt/Archiv/</tagBase> </configuration> </plugin> </plugins> </build>
After debugging the release plugin I found the place in the source code of release plugin which incorrectly translates the tagBase to url in pom.xml.tag:
RewritePomsForReleasePhase.java:278 in method translateUrlPath()
return StringUtils.replace( urlPath, trunkPath.substring( i ), tagPath.substring( i ) );
After the common path between trunk und tag urls is correctly computed, the StringUtils.replaces the wrong occurence of trunkPath.substring in urlPath, because the urlPath in this case contains more than one trunkPath.substring: Entwicklungswerkzeuge and Entwicklung.