Class RegexPropertyMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="regex-property", defaultPhase=VALIDATE, threadSafe=true) public class RegexPropertyMojo extends AbstractRegexPropertyMojo
Sets a property by applying a regex replacement rule to a supplied value.
Since:
1.7
  • Field Details

    • name

      @Parameter(required=true) private String name
      The property to set.
    • value

      @Parameter(required=true) private String value
      The pre-transformation value.
    • regex

      @Parameter(required=true) private String regex
      The regex to replace.
    • replacement

      @Parameter(defaultValue="") private String replacement
      The replacement.
    • failIfNoMatch

      @Parameter(defaultValue="true") private boolean failIfNoMatch
      Whether to fail if no match is found.
    • toUpperCase

      @Parameter(defaultValue="false") private boolean toUpperCase
      Make the value of the resulting property upper case.
      Since:
      1.11
    • toLowerCase

      @Parameter(defaultValue="false") private boolean toLowerCase
      Make the value of the resulting property lower case.
      Since:
      1.11
  • Constructor Details

    • RegexPropertyMojo

      public RegexPropertyMojo()
  • Method Details

    • execute

      public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
      org.apache.maven.plugin.MojoFailureException