Replace Task

This section relates to the ReplaceTask

Please see the tasks and parameters. documentation for details of how to call this tasks from your orchestration file.

This is the standard search/replacement using any key/value pair. This task supports literal replacement strings, not regular expressions.

This task supports filesetIncludes and filesetExcludes ANT filesets.

How do I enable it?

  1. Add a ReplaceTask to your orchestration
  2. Specify the directoryToSearch, below which the search/replace will be performed
  3. Specify a replaceFilterFilePath to the location of the search/replace properties file. If this is inside the deployment archive, use $ARCHIVE_ROOT/path/to/file. If this is environment dependent, use Data Dictionary items in the path, or built in $SERVER, $ENVIRONMENT etc.
  4. Specify filesetIncludes and filesetExcludes to select which files will be included in the search/replace operation.

Java properties file

This file is used for the standard literal value search/replacement. In the task, you specify a path to the file used to hold the search/replace properties (replaceFilterFilePath).

Here is an example from a java properties file:

Log4jFileAppenderPathPlaceHolder=/usr/websphere6/mvwasenv01/AppServer/logs/mvprojectServerSysTst41
logs/mvprojectLogs/=logs/mvprojectServerSysTst41/mvprojectLogs/

http\://10.162.74.153\:30001=http://10.245.811.201:10051

/wps/wcm/connect/content=/wps/wcm/connect/devcontent_MV_personal_bankingjxadmin@mvcloud04

In this example the delimiter is the "=" character. The delimiter will be the first un-escaped [space], [=] or [:] character. All occurrences of the keys in this file will be replaced with the corresponding values in all files under the target directory. Note that we escape a [:] character preceding the intended delimiter [=] to prevent it being used instead.