Hi!
This is my first question in this mailinglist, so be clement with me. ;)
I try to replace a multiline-token with a multiline-value, but the token
is not recognised, so nothing is replaced.
But why?
If I give only a singleline-token, it is replaced by the multiline-value.
Could someone be so kind telling me where the fault is?
Thanky in advance!
Mike
------------------------------------------
Here the NOT WORKING multi-line version:
------------------------------------------
<target name="edit-grinder.scriptfile" description="Replaces the standard
values with the uservalues from runtest.properties"
depends="backup-grinder.propertiestemplate">
<replace file="${grinder.script.dir}/${grinder.propertiesfile}.bak">
<replacetoken><![CDATA[#
# This is grinder.properties.tmpl
# Do not edit anything here!
# Make your changes in your runtest.properties
#]]></replacetoken>
<replacevalue><![CDATA[#
# ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
ATTENTION!
#
# This file is changed automagically by ant
#
# If you change this file manually without knowing exactly what you
# are doing, chances are very good that your changes will not survive
# the next start of ant ;-)
#
# ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
ATTENTION!
#]]></replacevalue>
</replace>
<move file="${grinder.script.dir}/${grinder.propertiesfile}.bak"
tofile="${grinder.script.dir}/${grinder.propertiesfile}"/>
</target>
------------------------------------------
------------------------------------------
INPUT ("${grinder.script.dir}/${grinder.propertiesfile}.bak"):
------------------------------------------
#
# This is grinder.properties.tmpl
# Do not edit anything here!
# Make your changes in your runtest.properties
#
# grinder.processes=1
grinder.processes=[<grinder.processes>]
------------------------------------------
------------------------------------------
OUTPUT without any change
("${grinder.script.dir}/${grinder.propertiesfile}"):
------------------------------------------
#
# This is grinder.properties.tmpl
# Do not edit anything here!
# Make your changes in your runtest.properties
#
# grinder.processes=1
grinder.processes=[<grinder.processes>]
------------------------------------------
------------------------------------------
------------------------------------------
------------------------------------------
------------------------------------------
------------------------------------------
Here the working single-line version:
------------------------------------------
<target name="edit-grinder.scriptfile" description="Replaces the
standard values with the uservalues from runtest.properties"
depends="backup-grinder.propertiestemplate">
<replace file="${grinder.script.dir}/${grinder.propertiesfile}.bak">
<replacetoken><![CDATA[# This is
grinder.properties.tmpl]]></replacetoken>
<replacevalue><![CDATA[#
# ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
ATTENTION!
#
# This file is changed automagically by ant
#
# If you change this file manually without knowing exactly what you
# are doing, chances are very good that your changes will not survive
# the next start of ant ;-)
#
# ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
ATTENTION!
#]]></replacevalue>
</replace>
<move file="${grinder.script.dir}/${grinder.propertiesfile}.bak"
tofile="${grinder.script.dir}/${grinder.propertiesfile}"/>
</target>
------------------------------------------
------------------------------------------
OUTPUT ("${grinder.script.dir}/${grinder.propertiesfile}"):
------------------------------------------
#
#
# ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
ATTENTION!
#
# This file is changed automagically by ant
#
# If you change this file manually without knowing exactly what you
# are doing, chances are very good that your changes will not survive
# the next start of ant ;-)
#
# ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
ATTENTION!
#
# Do not edit anything here!
# Make your changes in your runtest.properties
#
# grinder.processes=1
grinder.processes=[<grinder.processerocesses>]