ちょっとしたミス?
<condition property="create_stub">
<and>
<available file="${create_stub_command_file}" property="stub_script.present" />
<isset property="packaged_stub_file"/>
</and>
</condition>
私はそれが何かをしているとは信じていませんproperty="stub_script.present"。そのはず:
<condition property="create_stub">
<and>
<available file="${create_stub_command_file}"/>
<isset property="packaged_stub_file"/>
</and>
</condition>
その条件ステートメントが行っているのは、 というプロパティの設定だけcreate_stubです。ファイルまたはディレクトリの両方{$create_stub_command_file}が存在する場合、およびプロパティpackaged_stuf_fileが任意の値に設定されている場合、プロパティを設定します。プロパティpackaged_stub_fileは、設定されている限り、false、null 文字列、 、trueまたは任意の値に設定できます。YES! YES! YES!
これで、このプロパティをターゲットのテストとして使用できます。
<target name="package_stub"
if="create_stub">
<blah...blah...blah/>
<yadda...yadda...yadda/>
</target>
このターゲットは、プロパティが設定されpackage_stubている場合にのみ実行されます。そして、上記が true のpackage_stub場合にのみ設定されます。<condition>
その<condition>ステートメントはターゲットの外側にある必要があるため、ターゲットが実行される前に最初に実行されます。