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
Fields Modifier and Type Field Description private boolean
failIfNoMatch
Whether to fail if no match is found.private java.lang.String
name
The property to set.private java.lang.String
regex
The regex to replace.private java.lang.String
replacement
The replacement.private boolean
toLowerCase
Make the value of the resulting property lower case.private boolean
toUpperCase
Make the value of the resulting property upper case.private java.lang.String
value
The pre-transformation value.-
Fields inherited from class org.codehaus.mojo.buildhelper.AbstractDefinePropertyMojo
project
-
-
Constructor Summary
Constructors Constructor Description RegexPropertyMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute()
-
Methods inherited from class org.codehaus.mojo.buildhelper.AbstractRegexPropertyMojo
execute
-
Methods inherited from class org.codehaus.mojo.buildhelper.AbstractDefinePropertyMojo
defineProperty, getProject
-
-
-
-
Field Detail
-
name
@Parameter(required=true) private java.lang.String name
The property to set.
-
value
@Parameter(required=true) private java.lang.String value
The pre-transformation value.
-
regex
@Parameter(required=true) private java.lang.String regex
The regex to replace.
-
replacement
@Parameter(defaultValue="") private java.lang.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
-
-