Fork me on GitHub

build-helper:regex-property

Full name:

org.codehaus.mojo:build-helper-maven-plugin:3.8.0:regex-property

Description:

Sets a property by applying a regex replacement rule to a supplied value.

Attributes:

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

Required Parameters

Name Type Since Description
<name> String - The property to set.
<value> String - The pre-transformation value.

Optional Parameters

Name Type Since Description
<failIfNoMatch> boolean - Whether to fail if no match is found.
Default: true
<regex> String - The regex to replace. Mutually exclusive with replacements.
<replacement> String - The replacement.
<replacementLiteral> boolean 3.6.2 Whether to treat the replacement as a literal string. If true, backslashes and dollar signs have no special meaning in the replacement.
Default: false
<replacements> List<RegexReplacement> 3.8.0 An ordered list of regex and replacement pairs, applied in sequence, each to the result of the previous one, for example <replacements><replacement><regex>-SNAPSHOT</regex><replacement>-RC</replacement></replacement></replacements>. Mutually exclusive with regex and replacement. replacementLiteral and failIfNoMatch apply to every pair.
<toLowerCase> boolean 1.11 Make the value of the resulting property lower case.
Default: false
<toUpperCase> boolean 1.11 Make the value of the resulting property upper case.
Default: false

Parameter Details

<failIfNoMatch>

Whether to fail if no match is found.
  • Type: boolean
  • Required: No
  • Default: true

<name>

The property to set.
  • Type: java.lang.String
  • Required: Yes

<regex>

The regex to replace. Mutually exclusive with replacements.
  • Type: java.lang.String
  • Required: No

<replacement>

The replacement.
  • Type: java.lang.String
  • Required: No

<replacementLiteral>

Whether to treat the replacement as a literal string. If true, backslashes and dollar signs have no special meaning in the replacement.
  • Type: boolean
  • Since: 3.6.2
  • Required: No
  • Default: false

<replacements>

An ordered list of regex and replacement pairs, applied in sequence, each to the result of the previous one, for example <replacements><replacement><regex>-SNAPSHOT</regex><replacement>-RC</replacement></replacement></replacements>. Mutually exclusive with regex and replacement. replacementLiteral and failIfNoMatch apply to every pair.
  • Type: java.util.List<org.codehaus.mojo.buildhelper.RegexReplacement>
  • Since: 3.8.0
  • Required: No

<toLowerCase>

Make the value of the resulting property lower case.
  • Type: boolean
  • Since: 1.11
  • Required: No
  • Default: false

<toUpperCase>

Make the value of the resulting property upper case.
  • Type: boolean
  • Since: 1.11
  • Required: No
  • Default: false

<value>

The pre-transformation value.
  • Type: java.lang.String
  • Required: Yes