When invoking the maven release plugin on a pom.xml referenced by a path including a '.', the release tag created is incorrect.
Example: mvn clean release:clean release:prepare release:perform [options] -f ./pom.xml
This is true for both modular and hierarchical projects:
When releasing projects with either structure, invoking maven with "-f ./parent-pom/pom.xml" and "-f ./pom.xml" respectively, the tag operation copies from one level too high. For example if the svn structure is as follows:
and a release is being made from trunk, the tag project-1.0.0 would contain the complete svn structure. When a release is being made from /branches/project-0.1.x, the tag project-0.1.0 would contain the two branches:
After some debugging, I've found that the issue is caused by function getBaseWorkingDirectoryParentCount in org.apache.maven.shared.release.util.ReleaseUtil.
I've created a patch (for trunk and 2.5), as attached, and tested it successfully on Windows7 and RHEL, with jdk1.6.0_26 and maven 3.0.4.
Let me know if the patch is OK (we are currently using it without any issue, and resolving this bug) and I'll commit it accordingly.