Fork me on GitHub

mavanagaiata:check

Full name:

com.github.koraktor:mavanagaiata:1.1.0:check

Description:

This goal checks various aspects of a Git repository to ensure it is in a valid state prior to a build

The following checks are available:

  • Clean working directory (enabled by default)
  • Tagged commit
  • Branch name
  • Commit message

Attributes:

  • Requires a Maven project to be executed.
  • The goal is thread-safe and supports parallel builds.
  • Since version: 0.8.0.
  • Binds by default to the lifecycle phase: validate.

Optional Parameters

Name Type Since Description
<baseDir> File - The working tree of the Git repository.

If there is only one project inside the Git repository this is probably ${project.basedir} (default).

Note: The GIT_DIR can be found automatically even if this is not the real working tree but one of its subdirectories. But Mavanagaiata cannot determine the state of the working tree (e.g. for the dirty flag) if this is not set correctly.


Default: ${project.basedir}
User Property: mavanagaiata.baseDir
<checkBranch> String - Check whether the current branch is the given branch
User Property: mavanagaiata.checkBranch
<checkClean> boolean - Check if the working directory is clean
Default: true
User Property: mavanagaiata.checkClean
<checkCommitMessage> String - Check whether the message of the current commit matches the given format
User Property: mavanagaiata.checkCommitMessage
<checkTag> boolean - Check whether the current commit is tagged
Default: false
User Property: mavanagaiata.checkTag
<dateFormat> String - The date format to use for various dates
Default: MM/dd/yyyy hh:mm a Z
User Property: mavanagaiata.dateFormat
<dirtyFlag> String 0.4.0 The flag to append to refs if there are changes in the index or working tree

Setting this to either "false" or "null" will disable flagging refs as dirty.


Default: -dirty
User Property: mavanagaiata.dirtyFlag
<dirtyIgnoreUntracked> boolean 0.5.0 Specifies if the dirty flag should also be appended if there are untracked files

If false only modified files that are already known to Git will cause the dirty flag to be appended.

Warning: Do not enable this if builds should be reproducible.


Default: false
User Property: mavanagaiata.dirtyIgnoreUntracked
<failGracefully> boolean 0.6.0 Specifies if a failed execution of the mojo will stop the build process

If true a failure during mojo execution will not stop the build process.


Default: false
User Property: mavanagaiata.failGracefully
<gitDir> File - The GIT_DIR path of the Git repository

Warning: Do not set this when you don't have a good reason to do so. The GIT_DIR can be found automatically if your project resides somewhere in a usual Git repository.


User Property: mavanagaiata.gitDir
<head> String - The commit or ref to use as starting point for operations
Default: HEAD
User Property: mavanagaiata.head
<propertyPrefixes> String[] - The prefixes to prepend to property keys
Default: mavanagaiata,mvngit
User Property: mavanagaiata.propertyPrefixes
<skip> boolean 0.5.0 Skip the plugin execution
Default: false
User Property: mavanagaiata.skip
<skipNoGit> boolean 0.5.0 Skip the plugin execution if not inside a Git repository
Default: false
User Property: mavanagaiata.skipNoGit

Parameter Details

<baseDir>

The working tree of the Git repository.

If there is only one project inside the Git repository this is probably ${project.basedir} (default).

Note: The GIT_DIR can be found automatically even if this is not the real working tree but one of its subdirectories. But Mavanagaiata cannot determine the state of the working tree (e.g. for the dirty flag) if this is not set correctly.

  • Type: java.io.File
  • Required: No
  • User Property: mavanagaiata.baseDir
  • Default: ${project.basedir}

<checkBranch>

Check whether the current branch is the given branch
  • Type: java.lang.String
  • Required: No
  • User Property: mavanagaiata.checkBranch

<checkClean>

Check if the working directory is clean
  • Type: boolean
  • Required: No
  • User Property: mavanagaiata.checkClean
  • Default: true

<checkCommitMessage>

Check whether the message of the current commit matches the given format
  • Type: java.lang.String
  • Required: No
  • User Property: mavanagaiata.checkCommitMessage

<checkTag>

Check whether the current commit is tagged
  • Type: boolean
  • Required: No
  • User Property: mavanagaiata.checkTag
  • Default: false

<dateFormat>

The date format to use for various dates
  • Type: java.lang.String
  • Required: No
  • User Property: mavanagaiata.dateFormat
  • Default: MM/dd/yyyy hh:mm a Z

<dirtyFlag>

The flag to append to refs if there are changes in the index or working tree

Setting this to either "false" or "null" will disable flagging refs as dirty.

  • Type: java.lang.String
  • Since: 0.4.0
  • Required: No
  • User Property: mavanagaiata.dirtyFlag
  • Default: -dirty

<dirtyIgnoreUntracked>

Specifies if the dirty flag should also be appended if there are untracked files

If false only modified files that are already known to Git will cause the dirty flag to be appended.

Warning: Do not enable this if builds should be reproducible.

  • Type: boolean
  • Since: 0.5.0
  • Required: No
  • User Property: mavanagaiata.dirtyIgnoreUntracked
  • Default: false

<failGracefully>

Specifies if a failed execution of the mojo will stop the build process

If true a failure during mojo execution will not stop the build process.

  • Type: boolean
  • Since: 0.6.0
  • Required: No
  • User Property: mavanagaiata.failGracefully
  • Default: false

<gitDir>

The GIT_DIR path of the Git repository

Warning: Do not set this when you don't have a good reason to do so. The GIT_DIR can be found automatically if your project resides somewhere in a usual Git repository.

  • Type: java.io.File
  • Required: No
  • User Property: mavanagaiata.gitDir

<head>

The commit or ref to use as starting point for operations
  • Type: java.lang.String
  • Required: No
  • User Property: mavanagaiata.head
  • Default: HEAD

<propertyPrefixes>

The prefixes to prepend to property keys
  • Type: java.lang.String[]
  • Required: No
  • User Property: mavanagaiata.propertyPrefixes
  • Default: mavanagaiata,mvngit

<skip>

Skip the plugin execution
  • Type: boolean
  • Since: 0.5.0
  • Required: No
  • User Property: mavanagaiata.skip
  • Default: false

<skipNoGit>

Skip the plugin execution if not inside a Git repository
  • Type: boolean
  • Since: 0.5.0
  • Required: No
  • User Property: mavanagaiata.skipNoGit
  • Default: false