You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ol...@apache.org on 2012/08/31 23:57:44 UTC
svn commit: r1379635 -
/maven/plugins/trunk/maven-scm-publish-plugin/src/main/java/org/apache/maven/plugins/scmpublish/ScmPublishPublishMojo.java
Author: olamy
Date: Fri Aug 31 21:57:43 2012
New Revision: 1379635
URL: http://svn.apache.org/viewvc?rev=1379635&view=rev
Log:
use scmBranch for checkin too
Modified:
maven/plugins/trunk/maven-scm-publish-plugin/src/main/java/org/apache/maven/plugins/scmpublish/ScmPublishPublishMojo.java
Modified: maven/plugins/trunk/maven-scm-publish-plugin/src/main/java/org/apache/maven/plugins/scmpublish/ScmPublishPublishMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-scm-publish-plugin/src/main/java/org/apache/maven/plugins/scmpublish/ScmPublishPublishMojo.java?rev=1379635&r1=1379634&r2=1379635&view=diff
==============================================================================
--- maven/plugins/trunk/maven-scm-publish-plugin/src/main/java/org/apache/maven/plugins/scmpublish/ScmPublishPublishMojo.java (original)
+++ maven/plugins/trunk/maven-scm-publish-plugin/src/main/java/org/apache/maven/plugins/scmpublish/ScmPublishPublishMojo.java Fri Aug 31 21:57:43 2012
@@ -29,6 +29,7 @@ import org.apache.maven.plugins.annotati
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.scm.CommandParameter;
import org.apache.maven.scm.CommandParameters;
+import org.apache.maven.scm.ScmBranch;
import org.apache.maven.scm.ScmException;
import org.apache.maven.scm.ScmFileSet;
import org.apache.maven.scm.command.add.AddScmResult;
@@ -56,7 +57,7 @@ import java.util.TreeSet;
*
* @deprecated superseded by publish-scm which does the same in on step only and has more features
*/
-@Mojo(name = "publish", defaultPhase = LifecyclePhase.POST_SITE, aggregator = true)
+@Mojo ( name = "publish", defaultPhase = LifecyclePhase.POST_SITE, aggregator = true )
public class ScmPublishPublishMojo
extends AbstractScmPublishMojo
{
@@ -64,19 +65,19 @@ public class ScmPublishPublishMojo
/**
* Display list of added, deleted, and changed files, but do not do any actual SCM operations.
*/
- @Parameter(property = "scmpublish.dryRun")
+ @Parameter ( property = "scmpublish.dryRun" )
private boolean dryRun;
/**
* Run add and delete commands, but leave the actually checkin for the user to run manually.
*/
- @Parameter(property = "scmpublish.skipCheckin")
+ @Parameter ( property = "scmpublish.skipCheckin" )
private boolean skipCheckin;
/**
* SCM log/checkin comment for this publication.
*/
- @Parameter(property = "scmpublish.checkinComment", defaultValue = "Site checkin for project ${project.name}")
+ @Parameter ( property = "scmpublish.checkinComment", defaultValue = "Site checkin for project ${project.name}" )
private String checkinComment;
/**
@@ -238,7 +239,9 @@ public class ScmPublishPublishMojo
try
{
logInfo( "Checkin to the scm" );
- CheckInScmResult checkinResult = scmProvider.checkIn( scmRepository, updatedFileSet, checkinComment );
+
+ CheckInScmResult checkinResult =
+ scmProvider.checkIn( scmRepository, updatedFileSet, new ScmBranch( scmBranch ), checkinComment );
if ( !checkinResult.isSuccess() )
{
logError( "checkin operation failed: %s",
@@ -349,7 +352,7 @@ public class ScmPublishPublishMojo
try
{
CommandParameters commandParameters = new CommandParameters();
- commandParameters.setString( CommandParameter.MESSAGE , "Adding new site files." );
+ commandParameters.setString( CommandParameter.MESSAGE, "Adding new site files." );
commandParameters.setString( CommandParameter.FORCE_ADD, Boolean.TRUE.toString() );
AddScmResult addResult = scmProvider.add( scmRepository, addedFileSet, commandParameters );
if ( !addResult.isSuccess() )