私はすべての構築タスクを、別々に実行することを意図していないいくつかのターゲットに分割しています。他の2つのターゲットからユーザーが入力した値を使用しようとしていますtargetAが、それらは異なるスコープにあるようです。これを修正する1つの方法は、 andtargetAのdependsプロパティに追加することですが、結果として2回呼び出されます。targetBtargetCtargetA
では、その値をグローバルに保存する方法はありますか?または、ターゲットが1回だけ実行されるようにしますか?
<target name="targetA" description="..." hidden="true">
<input propertyName="property" defaultValue="default" ></input>
<!-- some action goes on here -->
</target>
<target name="targetB" description="..." hidden="true">
<echo message="${property}" />
<!-- some action goes on here -->
</target>
<target name="targetC" description="..." hidden="true">
<echo message="${property}" />
<!-- some action goes on here -->
</target>
<target name="install">
<phingcall target="targetA" />
<phingcall target="targetB" />
<phingcall target="targetC" />
</target>