From eb4631e6f2f4e7b1ee547ab793d734802448b4a2 Mon Sep 17 00:00:00 2001 From: Jason van Zyl Date: Sat, 21 May 2005 19:08:10 +0000 Subject: [PATCH] o the getScm() call creates a new instance of the scm bean so I corrected some spots where it was being used because it was assuming the target/checkout directory for the prepare phase. this needs a touch of work but i left it pretty much as is to get it working. i have successfully prepared for the release and now i'm going to try and perform the release. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@171239 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/maven/plugin/release/PrepareReleaseMojo.java | 4 +++- .../src/main/java/org/apache/maven/plugin/scm/ScmBean.java | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) 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; }