Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2006-2014 smartics, Kronseder & Reiner GmbH
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   *     http://www.apache.org/licenses/LICENSE-2.0
   *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
 package com.redhat.rcm.maven.plugin.buildmetadata.common;

Information to control the gathering of SCM meta data.

Author(s):
Robert Reiner
Version:
$Revision:591 $
 
 public final class ScmControl
 {
   // ********************************* Fields *********************************
 
   // --- constants ------------------------------------------------------------
 
   // --- members --------------------------------------------------------------
 
  
Flag to fail if local modifications have been found. The value is true if the build should fail if there are modifications (any files not in-sync with the remote repository), false if the fact is only to be noted in the build properties.
 
   private final boolean failOnLocalModifications;

  
The flag to ignore files and directories starting with a dot for checking modified files. This implicates that any files or directories, starting with a dot, are ignored when the check on changed files is run. If the value is true, dot files are ignored, if it is set to false, dot files are respected.
 
   private final boolean ignoreDotFilesInBaseDir;

  
In offline mode the plugin will not generate revision information.
 
   private final boolean offline;

  
Add SCM information if set to true, skip it, if set to false. If you are not interested in SCM information, set this to false.
 
   private final boolean addScmInfo;

  
If it should be checked if the local files are up-to-date with the remote files in the SCM repository. If the value is true the result of the check, including the list of changed files, is added to the build meta data.
 
   private final boolean validateCheckout;

  
Fail if revision is requested to be retrieved, access to SCM is provided, system is online, nothing should prevent the build from fetching the information.

If set to true the build will fail, if revision cannot be fetched, false will continue so that the meta data do not contain the revision.

 
   private final boolean failOnMissingRevision;
 
   // ****************************** Initializer *******************************
 
   // ****************************** Constructors ******************************
 
   // CHECKSTYLE:OFF
 
  
Default constructor.

Parameters:
failOnLocalModifications the value for failOnLocalModifications.
ignoreDotFilesInBaseDir the flag to ignore files and directories starting with a dot for checking modified files.
offline the value for offline.
addScmInfo the value for addScmInfo.
validateCheckout the value for validateCheckout.
failOnMissingRevision the value for failOnMissingRevision.
 
   public ScmControl(// NOPMD
       final boolean failOnLocalModifications,
      final boolean ignoreDotFilesInBaseDirfinal boolean offline,
      final boolean addScmInfofinal boolean validateCheckout,
      final boolean failOnMissingRevision)
  {
    this. = failOnLocalModifications;
    this. = ignoreDotFilesInBaseDir;
    this. = offline;
    this. = addScmInfo;
    this. = validateCheckout;
    this. = failOnMissingRevision;
  }
  // CHECKSTYLE:ON
  // ****************************** Inner Classes *****************************
  // ********************************* Methods ********************************
  // --- init -----------------------------------------------------------------
  // --- get&set --------------------------------------------------------------

  
Returns the value for failOnLocalModifications.

Flag to fail if local modifications have been found. The value is true if the build should fail if there are modifications (any files not in-sync with the remote repository), false if the fact is only to be noted in the build properties.

Returns:
the value for failOnLocalModifications.
  public boolean isFailOnLocalModifications()
  {
  }

  
Returns the flag to ignore files and directories starting with a dot for checking modified files. This implicates that any files or directories, starting with a dot, are ignored when the check on changed files is run. If the value is true, dot files are ignored, if it is set to false, dot files are respected.

Returns:
the flag to ignore files and directories starting with a dot for checking modified files.
  public boolean isIgnoreDotFilesInBaseDir()
  {
  }

  
Returns the value for offline.

In offline mode the plugin will not generate revision information.

Returns:
the value for offline.
  public boolean isOffline()
  {
    return ;
  }

  
Returns the value for addScmInfo.

Add SCM information if set to true, skip it, if set to false. If you are not interested in SCM information, set this to false.

Returns:
the value for addScmInfo.
  public boolean isAddScmInfo()
  {
    return ;
  }

  
Returns the value for validateCheckout.

If it should be checked if the local files are up-to-date with the remote files in the SCM repository. If the value is true the result of the check, including the list of changed files, is added to the build meta data.

Returns:
the value for validateCheckout.
  public boolean isValidateCheckout()
  {
    return ;
  }

  
Returns the value for failOnMissingRevision.

Fail if revision is requested to be retrieved, access to SCM is provided, system is online, nothing should prevent the build from fetching the information.

If set to true the build will fail, if revision cannot be fetched, false will continue so that the meta data do not contain the revision.

Returns:
the value for failOnMissingRevision.
  public boolean isFailOnMissingRevision()
  {
    return ;
  }
  // --- business -------------------------------------------------------------
  // --- object basics --------------------------------------------------------
New to GrepCode? Check out our FAQ X