Apache Antを使用する1.7.1Ant filtersetタスクが再帰しない
再帰がtrueに設定されている場合、Ant Filterタスクは同じプロパティを1行で数回解析できないようです。私はAntのドキュメントでこれについて何も言及していません。これは起こるはずですか?私が手
myval=fish
[email protected]@-
[email protected]@[email protected]@
:これらのファイルと
<project basedir="." default="assemble" >
<macrodef name="copy-and-filter">
<sequential>
<copy tofile="to.txt" file="from.txt" overwrite="true">
<filterset recurse="true">
<filtersfile file="filters.properties"/>
</filterset>
</copy>
</sequential>
</macrodef>
<target name="assemble">
<copy-and-filter />
</target>
</project>
:
from.txt:
I want my broker to be: @[email protected]
and my client to be: @[email protected]
filters.propertiesこのAntビルドファイルを使用して
出力は:
i want my broker to be: -fish-
and my client to be: myval
とない私が予想すると、このようになります:
i want my broker to be: -fish-
and my client to be: fish-fish
私はfalseに再帰を設定した場合、私は「正しい」動作を取得。
i want my broker to be: [email protected]@-
and my client to be: @[email protected]@[email protected]
これはなぜですか?
このコードは、必要な方法でAntの新しいバージョンで機能します。このためのAntバグがありました:https://issues.apache.org/bugzilla/show_bug.cgi?id=44226 1.8.0と1.81で修正されているようです。 –