Hello,
I have tried this little set of targets, by calling "ant test" but test.read
doesn't execute as one could have thought.
Would somebody have an idea ?
Are the writing deferred until the JVM closes or something ?
Here are the target, followed by the execution stdout :
<target name="test.copy">
<copyfile src="./A"
dest="./B"/>
<echo message="Copied B"/>
</target>
<target name="test.read" depends="B.check" if="B.exists">
<echo message="Test read executed"/>
</target>
<target name="test" depends="test.copy, test.read">
<echo message="Test executed"/>
</target>
Executing Target: test.copy
Copied B
Executing Target: B.check
Verifying presence of B
null
Executing Target: test.read
Executing Target: test
Test executed
NB : if you run "ant test" a second time right after, it will work fine,
since the first execution DID copy the A file to B...
Julien