Issue writing out file path properties in ant

I'm having an issue with writing out a property which holds the value of a directory path into a property file. My script originally reads in this particular property, call it 'appserver.home', from a props file using the ``. I've echoed the value coming in and it reads correctly as *C\:\\\\somedir\\\\jboss_4_2_3.* What my script needs to do next is provide this value to another properties file (used by another ant script - though that's not important). To create this other file I'm using a kind off template file with place holders surrounded by $....$ to insert the correct values in the correct place, using the following :- .... The problem is that the value now in the target.props is *C:\somedir\jboss_4_2_3* ie it's lost the escape characters. When the next ant script uses this file it interprets the property value as *C:somedirjboss_4_2_3*. So the question how do I tell ant that the value I'm writing is a file path ? Note I have tried the following, which actually works :- .. ie it outputs the name as *c\\:\\\\somedir\\\\jboss4_2_3*, but I'd rather not use this technique and rather use the template file technique, as it contains some properties which are always static, as well as comments etc. Thanks in advance

以上就是Issue writing out file path properties in ant的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑