xpathreplacement:process-file

Replaces matches of an XPath expression in a file.

Mojo Attributes:

  • Requires a Maven 2.0 project to execute.
  • Automatically executes within the lifecycle phase: process-resources

Required Parameters

Name Type Description
inputFile File File to make replacements to.
value String Value to replace matches with.
xpath String XPath expression to replace match.

Optional Parameters

Name Type Description
namespaceMappings Map Mapping of prefixes to namespaces in the XPath expression.
outputDirectory File Directory to place output in. Default value is ${project.build.outputDirectory}.

Parameter Details

inputFile

File to make replacements to.

  • Type: java.io.File
  • Required: Yes
  • Expression: ${xpathReplacement.input}

namespaceMappings Mapping of prefixes to namespaces in the XPath expression.
  • Type: java.util.Map
  • Required: No

outputDirectory Directory to place output in.
  • Type: java.io.File
  • Required: No
  • Expression: ${xpathReplacement.outputDirectory}
  • Default: ${project.build.outputDirectory}

value Value to replace matches with.
  • Type: java.lang.String
  • Required: Yes
  • Expression: ${xpathReplacement.value}

xpath XPath expression to replace match.
  • Type: java.lang.String
  • Required: Yes
  • Expression: ${xpathReplacement.xpath}