Hi I had an idea for a relatively simple (but useful!) feature. Could we have a property (you could do it as a function, but that would seem like overkill, to me) which tells you whether the -v parameter was passed on the command line? The reason I ask this is that, while certain NAnt targets will do different things based on whether this parameter was passed, I can't find a way to do the same for custom tools, such as Starteam or FxCop.
With both these tools, it's possible to output a verbose log, which is useful for debugging. But when everything's running fine as far as that tool's concerned, this can just get in the way, inflating log file size, increasing build times, increasing the time it takes to view the log, and making it harder to find the bit that you actually want to look at. For Starteam, I'd like to do something like this: <exec program="${st.exe}" > <arg value="lck"/> <arg value="-nologo"/> <arg value="-p" /> <arg value=""${st.prjspec}"" /> <arg value="-u"/> <arg value="-is"/> <arg value="-break"/> <arg value="-x"/> <arg value="-q" unless="${nant.verbose}"/> <arg value="-stop" /> <arg value="${st.wildcard}" /> </exec> The -q parameter is the one that tells Starteam to be quiet, meaning no output. The unless parameter uses ${nant.verbose} as its condition, which would evaluate to true if I pass -v to NAnt, causing it to display its output. I could just pass in my own parameter using -D:, but then the command would look like this: nant.exe -v -D:verbose="true" mytarget1 mytarget2 Telling it to be verbose twice just seems nasty. To fix that, I could add verbose attributes to all tasks, but then the script will look nasty. Adding a ${nant.verbose} property that gets set by default would seem like the best solution. Minor, I know, but it would be nice. What do you think? Regards John ********************************************************************** Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you must not copy, distribute or take any action in reliance to it. In such case, you should destroy this message and kindly notify the sender by reply email. Please advise immediately if you or your employer do not consent to Internet email for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of Minorplanet Systems Plc shall be understood as neither given nor endorsed by it. ********************************************************************** ------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput a projector? How fast can you ride your desk chair down the office luge track? If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 _______________________________________________ Nant-users mailing list Nant-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users