ant有替换一段文本的功能吗?

dagouaofei 2010-04-05 05:37:48
比如一个文件夹里有很多文件,比如50个java文件(或别的也可以),我想把这些文件里只要有"copyright 2008"的文本,都替换成"copyright 2010"。
ant能实现吗?最好能把脚本片段告诉我。谢谢!
...全文
77 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
liuhuan851002 2010-04-06
  • 打赏
  • 举报
回复
貌似可以.!
<replace file="${src}/index.html" token="@@@" value="wombat"/>
replaces occurrences of the string "@@@" with the string "wombat", in the file ${src}/index.html.
michaellufhl 2010-04-06
  • 打赏
  • 举报
回复
rumlee 2010-04-06
  • 打赏
  • 举报
回复
不知道ant能不能实现,但是知道自己写代码是肯定能够实现,而且写这个代码也就十几分钟的事情,何必那么懒呢?

62,614

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧