ant 删除注释和空行

<replaceregexp file="${basedir}/oa.ear/oaweb.war/WEB-INF/weblogic.xml" match="&lt;!--" replace="" flags="g" byline="true" encoding="utf-8"/><!--删除注释 -->

   <replaceregexp file="${basedir}/oa.ear/oaweb.war/WEB-INF/weblogic.xml" match="(.*)? --&gt;" replace="" flags="g" byline="true" encoding="utf-8"/><!--删除注释 -->

<replaceregexp match="^[ |\t]*[\n|\r\n]+" replace="" flags="gm" byline="false" encoding="utf-8"><!-- 删除多余空行 -->

猜你喜欢

转载自jerome-wang.iteye.com/blog/1699368
ANT