find-and-replace:file-contents
Full name:
software.xdev:find-and-replace-maven-plugin:1.0.4-SNAPSHOT:file-contents
Description:
Allows replacing file contents
Attributes:
- Requires a Maven project to be executed.
- The goal is thread-safe and supports parallel builds.
Required Parameters
Name | Type | Since | Description |
---|---|---|---|
<findRegex> |
String |
- |
The regex string to find. User Property: findRegex |
Optional Parameters
Name | Type | Since | Description |
---|---|---|---|
<baseDir> |
String |
- |
The base directory from which to perform the find and replace. This is relative to the location of the pom. Default: ${basedir} User Property: baseDir |
<encoding> |
String |
- |
Specify file encoding during file-contents replacement
Default set to Charset.defaultCharset(); User Property: encoding |
<exclusions> |
String |
- |
Regex filenames/directory-names to exclude. User Property: exclusions |
<fileMask> |
String |
- |
A CSV of the file types to search in. For example for the value: .xml Only files ending with .xml will be renamed.
For the value: .xml,.properties Only files ending with .xml,.properties will be renamed. Ignored for directories. User Property: fileMask |
<recursive> |
boolean |
- |
Whether the find and replace is recursive from the baseDir. Default: false User Property: recursive |
<replaceAll> |
boolean |
- |
Whether the find and replace maven plugin replaces all matches or just the first match. Default: true User Property: replaceAll |
<replaceLineBased> |
boolean |
- |
Specify to match line based or otherwise match the whole document.
When this value is set to Default: true User Property: replaceLineBased |
<replaceValue> |
String |
- |
The value to replace the matching findRegex with. User Property: replaceValue |
<skip> |
boolean |
- |
Skip execution of the plugin. Default: false User Property: skip |
Parameter Details
<baseDir>
The base directory from which to perform the find and replace. This is relative to the location of the pom.
- Type:
java.lang.String
- Required:
No
- User Property:
baseDir
- Default:
${basedir}
<encoding>
Specify file encoding during file-contents replacement
Default set to Charset.defaultCharset();
- Type:
java.lang.String
- Required:
No
- User Property:
encoding
<exclusions>
Regex filenames/directory-names to exclude.
- Type:
java.lang.String
- Required:
No
- User Property:
exclusions
<fileMask>
A CSV of the file types to search in. For example for the value: .xml Only files ending with .xml will be renamed.
For the value: .xml,.properties Only files ending with .xml,.properties will be renamed.
Ignored for directories.
- Type:
java.lang.String
- Required:
No
- User Property:
fileMask
<findRegex>
The regex string to find.
- Type:
java.lang.String
- Required:
Yes
- User Property:
findRegex
<recursive>
Whether the find and replace is recursive from the baseDir.
- Type:
boolean
- Required:
No
- User Property:
recursive
- Default:
false
<replaceAll>
Whether the find and replace maven plugin replaces all matches or just the first match.
- Type:
boolean
- Required:
No
- User Property:
replaceAll
- Default:
true
<replaceLineBased>
Specify to match line based or otherwise match the whole document.
When this value is set to false
more memory may be required as the whole file is processed at once.
- Type:
boolean
- Required:
No
- User Property:
replaceLineBased
- Default:
true
<replaceValue>
The value to replace the matching findRegex with.
- Type:
java.lang.String
- Required:
No
- User Property:
replaceValue
<skip>
Skip execution of the plugin.
- Type:
boolean
- Required:
No
- User Property:
skip
- Default:
false