You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2002/08/09 11:47:42 UTC
DO NOT REPLY [Bug 11585] New: -
The Replace Task ignores properties with multiline replacements
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11585>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11585
The Replace Task ignores properties with multiline replacements
Summary: The Replace Task ignores properties with multiline
replacements
Product: Ant
Version: 1.5
Platform: All
OS/Version: All
Status: NEW
Severity: Major
Priority: Other
Component: Core tasks
AssignedTo: ant-dev@jakarta.apache.org
ReportedBy: andre.anneck@spmtechnologies.com
CC: andre.anneck@spmtechnologies.com
If you are using the mulitline replacement like:
<replace
file="${workdir}/ejb-basis/conf/default/jboss.jcml" summary="true">
<replacetoken><![CDATA[<!-- BINDADDRESS -->]]></replacetoken>
<replacevalue><![CDATA[<attribute
name="BindAddress">${jbossHostname}</attribute>]]></replacevalue>
</replace>
The property jbossHostname is ignored.
When you look at Replace.java you can see why in line 123-127:
public void addText(String val) {
buf.append(val);
}
it should be replace with:
public void addText(String val) {
buf.append( project.replaceProperties( val ) );
}
And usage of final would hurt here:
public void addText( final String val ) {
buf.append( project.replaceProperties( val ) );
}
After this change the replace-multiline works as expected (at least as I
exepected) ;).
Take care,
Andre
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>