Index: PrepareReleaseMojo.java =================================================================== --- PrepareReleaseMojo.java (revision 643444) +++ PrepareReleaseMojo.java (working copy) @@ -19,6 +19,8 @@ * under the License. */ +import java.io.File; + import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.shared.release.ReleaseExecutionException; @@ -117,6 +119,12 @@ */ private boolean allowTimestampedSnapshots; + /** + * Work around for relative parent projects. Allows tagging at the relative parent's parent directory level. + * @parameter expression="${tagWorkingDirectory}" + */ + private String tagWorkingDirectory; + public void execute() throws MojoExecutionException, MojoFailureException { @@ -131,6 +139,13 @@ config.setUpdateDependencies( updateDependencies ); config.setAutoVersionSubmodules( autoVersionSubmodules ); config.setAllowTimestampedSnapshots( allowTimestampedSnapshots ); + if(tagWorkingDirectory != null){ + File dir = new File(tagWorkingDirectory); + if(dir.exists() && dir.isDirectory()){ + super.getLog().info("Configuring working directory to be "+dir.getAbsolutePath()); + config.setWorkingDirectory(dir.getAbsolutePath()); + } + } try { releaseManager.prepare( config, settings, reactorProjects, resume, dryRun );