Package com.redhat.rcm.maven.plugin.buildmetadata.common

Examples of com.redhat.rcm.maven.plugin.buildmetadata.common.ScmControl


  private ScmInfo createScmInfo()
  {
    final ScmCredentials scmCredentials =
        new ScmCredentials(settingsDecrypter, settings, userName, password,
            privateKey, passphrase);
    final ScmControl scmControl =
        new ScmControl(failOnLocalModifications, ignoreDotFilesInBaseDir,
            offline, addScmInfo, validateCheckout, failOnMissingRevision);
    final ScmInfo scmInfo =
        new ScmInfo(scmManager, connectionType, scmDateFormat, basedir,
            scmCredentials, tagBase, queryRangeInDays, buildDatePattern,
            scmControl, StringUtils.isNotBlank(remoteVersion) ? new ScmBranch(
View Full Code Here


   *
   * @param buildMetaDataProperties the build meta data properties.
   */
  public final void provideBuildMetaData(final Properties buildMetaDataProperties)
  {
    final ScmControl scmControl = scmInfo.getScmControl();
    if (scmControl.isAddScmInfo() && !scmControl.isOffline()
        && project.getScm() != null)
    {
      try
      {
        final ScmConnectionInfo scmConnectionInfo = loadConnectionInfo();
        final ScmAccessInfo scmAccessInfo = createScmAccessInfo();
        final RevisionHelper helper =
            new RevisionHelper(scmInfo.getScmManager(), scmConnectionInfo,
                scmAccessInfo, scmInfo.getBuildDatePattern());
        helper.provideScmBuildInfo(buildMetaDataProperties, scmControl);
      }
      catch (final ScmRepositoryException e)
      {
        throw new ScmNoRevisionException(
"Unable to determine SCM revision information.", e );
      }
      catch (final NoSuchScmProviderException e)
      {
        throw new ScmNoRevisionException(
"Unable to determine SCM revision information.", e );
      }
    }
    else
    {
      getLog().debug("Skipping SCM data since addScmInfo="
                + scmControl.isAddScmInfo() + ", offline="
                + scmControl.isOffline() + ", scmInfoProvided="
                + (project.getScm() != null) + ".");
    }
  }
View Full Code Here

   *
   * @param buildMetaDataProperties the build meta data properties.
   */
  public final void provideBuildMetaData(final Properties buildMetaDataProperties)
  {
    final ScmControl scmControl = scmInfo.getScmControl();
    if (scmControl.isAddScmInfo() && !scmControl.isOffline()
        && project.getScm() != null)
    {
      try
      {
        final ScmConnectionInfo scmConnectionInfo = loadConnectionInfo();
        final ScmAccessInfo scmAccessInfo = createScmAccessInfo();
        final RevisionHelper helper =
            new RevisionHelper(scmInfo.getScmManager(), scmConnectionInfo,
                scmAccessInfo, scmInfo.getBuildDatePattern());
        helper.provideScmBuildInfo(buildMetaDataProperties, scmControl);
      }
      catch (final ScmRepositoryException e)
      {
        throw new ScmNoRevisionException(
"Unable to determine SCM revision information.", e );
      }
      catch (final NoSuchScmProviderException e)
      {
        throw new ScmNoRevisionException(
"Unable to determine SCM revision information.", e );
      }
    }
    else
    {
      LOG.debug("Skipping SCM data since addScmInfo="
                + scmControl.isAddScmInfo() + ", offline="
                + scmControl.isOffline() + ", scmInfoProvided="
                + (project.getScm() != null) + ".");
    }
  }
View Full Code Here

  private ScmInfo createScmInfo()
  {
    final ScmCredentials scmCredentials =
        new ScmCredentials(settingsDecrypter, settings, userName, password,
            privateKey, passphrase);
    final ScmControl scmControl =
        new ScmControl(failOnLocalModifications, ignoreDotFilesInBaseDir,
            offline, addScmInfo, validateCheckout, failOnMissingRevision);
    final ScmInfo scmInfo =
        new ScmInfo(scmManager, connectionType, scmDateFormat, basedir,
            scmCredentials, tagBase, queryRangeInDays, buildDatePattern,
            scmControl, StringUtils.isNotBlank(remoteVersion) ? new ScmBranch(
View Full Code Here

TOP

Related Classes of com.redhat.rcm.maven.plugin.buildmetadata.common.ScmControl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.