Is it reasonable, for the build to throw an Exception if some properties are not expanded?
I'm only asking because I have found a typoed property to be the biggest timewaster with a build file. William Ferguson This transmission is for the intended addressee only and is confidential information. If you have received this transmission in error, please delete it and notify the sender. The contents of this E-mail are the opinion of the writer only and are not endorsed by Mincom Limited unless expressly stated otherwise. > -----Original Message----- > From: Stefan Bodewig [mailto:[EMAIL PROTECTED] > Sent: Friday, 8 September 2000 20:43 > To: [EMAIL PROTECTED] > Subject: Proposed way to make ${} happen at runtime > > > Hi, > > the appended patch will move ${} expansion (and the execution of all > tasks, including <property>) to runtime instead of parser time. > > As there are so many ways this could be implemented I wanted to make > sure I'm not totally of the hook and have introduced silly design > flaws. Therefore I wanted to get you comments before I commit > anything. > > The patched version has been working for me (bootstrapped Ant and > built Tomcat as well as my private projects successfully). > > <project name="test" default="echo"> > <target name="echo1"> > <echo message="${echo1}" /> > </target> > <property name="echo1" value="set globally" /> > > <target name="echo2" depends="setup2"> > <echo message="${echo2}" /> > </target> > > <target name="setup2"> > <property name="echo2" value="set after first use" /> > </target> > > <target name="setup3a"> > <property name="echo3" value="set in unused target" /> > </target> > > <target name="setup3"> > <property name="echo3" value="set before first use" /> > </target> > > <target name="echo3" depends="setup3"> > <echo message="${echo3}" /> > </target> > > <target name="echo" depends="echo1,echo2,echo3" /> > </project> > > will now generate > > echo1: > set globally > setup2: > echo2: > set after first use > setup3: > echo3: > set before first use > echo: > > instead of > > echo1: > ${echo1} > setup2: > echo2: > ${echo2} > setup3: > echo3: > set in unused target > echo: > > Comments please (including how stupid I am if this should be true). > > Stefan > >
