Package org.codehaus.mojo.buildhelper
Class RegexPropertyMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.codehaus.mojo.buildhelper.AbstractDefinePropertyMojo
org.codehaus.mojo.buildhelper.AbstractRegexPropertyMojo
org.codehaus.mojo.buildhelper.RegexPropertyMojo
- 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 Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
Whether to fail if no match is found.private String
The property to set.private String
The regex to replace.private String
The replacement.private boolean
Make the value of the resulting property lower case.private boolean
Make the value of the resulting property upper case.private String
The pre-transformation value.Fields inherited from class org.codehaus.mojo.buildhelper.AbstractDefinePropertyMojo
project
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.codehaus.mojo.buildhelper.AbstractRegexPropertyMojo
execute
Methods inherited from class org.codehaus.mojo.buildhelper.AbstractDefinePropertyMojo
defineProperty, getProject
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
name
The property to set. -
value
The pre-transformation value. -
regex
The regex to replace. -
replacement
The replacement. -
failIfNoMatch
@Parameter(defaultValue="true") private boolean failIfNoMatchWhether to fail if no match is found. -
toUpperCase
@Parameter(defaultValue="false") private boolean toUpperCaseMake the value of the resulting property upper case.- Since:
- 1.11
-
toLowerCase
@Parameter(defaultValue="false") private boolean toLowerCaseMake 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
-