Thursday, April 12, 2007

Good temporary files in Ant

I was reading this nice post on unsigning jars with Ant when this line caught my eye:

<tempfile destdir="${java.io.tmpdir}"
          prefix="unsign-"
          property="temp.file"/>

I was struck by an Aha! moment—using ${java.io.tmpdir} is clearly the Right Thing for creating temporary files in Java. Why not also in Ant?

Post a Comment