Thanks for the idea.
I also think I might perform use an antcall to call a target with an if
condition.
Thanks again for the help
john
>I also think I might perform use an antcall to call a target with an if
>condition.
here is an ant conditional copy. This is why I spit on XML as too
impoverished for programming and too bloated.
<!-- copy screenshot png from website to project dir, if it exists -->
<available property="has.screenshot"
file="${screenshot.dir}/${ant.project.name}.png" />
<antcall target="copy.screenshot" />
<!-- copy screenshot from website to project dir, if there is one. -->
<target name="copy.screenshot" if="has.screenshot">
<copy file="${screenshot.dir}/${ant.project.name}.png"
tofile="${package.dir}/${ant.project.name}screenshot.png"
failonerror="false" overwrite="true" />
</target>
What this says is :
if exists E:\mindprod\screenshot\currcon.png
copy E:\mindprod\screenshot\currcon.png
C:\com\mindprod\currcon\currconscreenshot.png

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
Wibble0@gmail.com - 31 Mar 2006 20:56 GMT
> >I also think I might perform use an antcall to call a target with an if
> >condition.
[quoted text clipped - 23 lines]
> Canadian Mind Products, Roedy Green.
> http://mindprod.com Java custom programming, consulting and coaching.
Why doesn't just the copy suffice?
<copy file="${screenshot.dir}/${ant.project.name}.png"
tofile="${package.dir}/${ant.project.name}screenshot.png"
failonerror="false" overwrite="true" />
XML is ugly but not unusable. Ant without If, for, runtarget and other
ant-contrib
tasks is unusable, but thats not because of XML.
Roedy Green - 31 Mar 2006 21:16 GMT
>Why doesn't just the copy suffice?
because it generates bogus error messages if the file does not exist.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.