diff --git a/maven-plugins/maven-release-plugin/src/main/java/org/apache/maven/plugin/release/PrepareReleaseMojo.java b/maven-plugins/maven-release-plugin/src/main/java/org/apache/maven/plugin/release/PrepareReleaseMojo.java index 4c39005624..5526899a8f 100644 --- a/maven-plugins/maven-release-plugin/src/main/java/org/apache/maven/plugin/release/PrepareReleaseMojo.java +++ b/maven-plugins/maven-release-plugin/src/main/java/org/apache/maven/plugin/release/PrepareReleaseMojo.java @@ -338,6 +338,8 @@ public class PrepareReleaseMojo { ScmBean scm = getScm(); + scm.setWorkingDirectory( basedir ); + if ( scm.getTag() == null ) { getLog().info( "What tag name should be used? [ " + tag + " ]" ); @@ -354,7 +356,7 @@ public class PrepareReleaseMojo scm.setTag( tag ); } - getScm().tag(); + scm.tag(); } catch ( Exception e ) { diff --git a/maven-plugins/maven-release-plugin/src/main/java/org/apache/maven/plugin/scm/ScmBean.java b/maven-plugins/maven-release-plugin/src/main/java/org/apache/maven/plugin/scm/ScmBean.java index 0dc3e00a7b..85d95b1e6d 100644 --- a/maven-plugins/maven-release-plugin/src/main/java/org/apache/maven/plugin/scm/ScmBean.java +++ b/maven-plugins/maven-release-plugin/src/main/java/org/apache/maven/plugin/scm/ScmBean.java @@ -175,7 +175,8 @@ public class ScmBean CheckInScmResult result = getScmManager().checkIn( repository, new ScmFileSet( new File( workingDirectory ), includes, excludes ), - tag, message ); + tag, + message ); checkResult( result ); } @@ -217,6 +218,8 @@ public class ScmBean public void setWorkingDirectory( String workingDirectory ) { + FileUtils.mkdir( workingDirectory ); + this.workingDirectory = workingDirectory; }