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: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] 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: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
