enforcer:enforce

Full name:

org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M3:enforce

Description:

This goal executes the defined enforcer-rules once per module.

Attributes:

  • Requires a Maven project to be executed.
  • Binds by default to the lifecycle phase: validate.

Optional Parameters

Name Type Since Description
<commandLineRules> String[] - Array of Strings that matches the EnforcerRules to execute.
User property is: rules.
<fail> boolean - Flag to fail the build if a version check fails.
Default value is: true.
User property is: enforcer.fail.
<failFast> boolean - Fail on the first rule that doesn't pass
Default value is: false.
User property is: enforcer.failFast.
<ignoreCache> boolean - Use this flag to disable rule result caching. This will cause all rules to execute on each project even if the rule indicates it can safely be cached.
Default value is: false.
User property is: enforcer.ignoreCache.
<rules> EnforcerRule[] - Array of objects that implement the EnforcerRule interface to execute.
<skip> boolean - Flag to easily skip all checks
Default value is: false.
User property is: enforcer.skip.

Parameter Details

<commandLineRules>

Array of Strings that matches the EnforcerRules to execute.
  • Type: java.lang.String[]
  • Required: No
  • User Property: rules

<fail>

Flag to fail the build if a version check fails.
  • Type: boolean
  • Required: No
  • User Property: enforcer.fail
  • Default: true

<failFast>

Fail on the first rule that doesn't pass
  • Type: boolean
  • Required: No
  • User Property: enforcer.failFast
  • Default: false

<ignoreCache>

Use this flag to disable rule result caching. This will cause all rules to execute on each project even if the rule indicates it can safely be cached.
  • Type: boolean
  • Required: No
  • User Property: enforcer.ignoreCache
  • Default: false

<rules>

Array of objects that implement the EnforcerRule interface to execute.
  • Type: org.apache.maven.enforcer.rule.api.EnforcerRule[]
  • Required: No

<skip>

Flag to easily skip all checks
  • Type: boolean
  • Required: No
  • User Property: enforcer.skip
  • Default: false