final boolean failOnMissingRevision = scmControl.isFailOnMissingRevision();
final RevisionNumberFetcher revisionFetcher =
new MavenScmRevisionNumberFetcher(scmManager, scmConnectionInfo,
scmAccessInfo);
final Revision revision = revisionFetcher.fetchLatestRevisionNumber();
if (revision != null)
{
buildMetaDataProperties.setProperty(Constant.PROP_NAME_SCM_URL,
scmConnectionInfo.getConnectionUrl());
final String revisionId = revision.getId();
buildMetaDataProperties.setProperty(Constant.PROP_NAME_SCM_REVISION_ID,
revisionId);
final Date revisionDate = revision.getDate();
final DateFormat format =
new SimpleDateFormat(buildDatePattern, Locale.ENGLISH);
final String revisionDateString = format.format(revisionDate);
buildMetaDataProperties.setProperty(Constant.PROP_NAME_SCM_REVISION_DATE,
revisionDateString);