Java Properties
Since RapidDeploy version 4.0.0, Java properties files are only used for the ReplaceTask. The SearchReplaceTask now uses name/value pairs in the orchestration task and so the following discussion does not apply to this task.
MidVision's application release automation tool uses Java property files for some aspects of deployment, such as search/replace key value pairs. It is useful to know the correct syntax of these files.
Java will see the first colon [:], equals[=] or [space] character as the delimiter for the line. Anything before one of these symbols is the key and the rest of the line is the value.
In order to get around this you must escape any [:], [=] or [space] characters that actually form part of the search string.
Example
If you want to do the following example replacement:
http://175.20.196.241:60420/CICS/DL977/RDL001=http://175.20.196.241:60420/CICS/DL977/RDL001
to replace http://175.20.196.241:60420/CICS/DL977/RDL001 with http://175.20.196.241:60420/CICS/DL977/RDL001, this would actually produce:
//175.20.196.241:60420/CICS/DL977/RDL001with http://175.20.196.241:60420/CICS/DL977/RDL001
In the output, which is not desired. Instead use:
http\://175.20.196.241\:60420/CICS/DL977/RDL001=http://175.20.196.241:60420/CICS/DL977/RDL001
Command line escaping
You can use these specimen commands as a template to perform batch replacements on multiple properties files.
The colon can be set as escaped by using the following command:
perl -p -i -e 's/\:/\\\:/g' *.props
The equals can be set as escaped by using the following command:
perl -p -i -e 's/\=/\\\=/g' *.props