use of org.apache.maven.scm.command.checkin.CheckInScmResult in project maven-plugins by apache.
the class AbstractScmPublishMojo method checkinFiles.
/**
* Check-in content from scm checkout.
*
* @throws MojoExecutionException
*/
protected void checkinFiles() throws MojoExecutionException {
if (skipCheckin) {
return;
}
ScmFileSet updatedFileSet = new ScmFileSet(checkoutDirectory);
try {
long start = System.currentTimeMillis();
CheckInScmResult checkinResult = checkScmResult(scmProvider.checkIn(scmRepository, updatedFileSet, new ScmBranch(scmBranch), checkinComment), "check-in files to SCM");
logInfo("Checked in %d file(s) to revision %s in %s", checkinResult.getCheckedInFiles().size(), checkinResult.getScmRevision(), DurationFormatUtils.formatPeriod(start, System.currentTimeMillis(), "H' h 'm' m 's' s'"));
} catch (ScmException e) {
throw new MojoExecutionException("Failed to perform SCM checkin", e);
}
}
Aggregations