Doesn't work unfortunately Henry. If I define a property in the
'parent' script it gets passed through with its value OK, but if I modify the
value in the 'child' script, when I get back to the parent, it still has the
original value. I'm guessing that properties are cascaded to child scripts
by value rather than by reference. I'm leaving the overwrite and readonly
attributes as their defaults (true and false respectively)
I'll
keep looking, but as the build process is all in the same process, it's looking
like a static member may be the easiest way forward.
Thanks
for you input Henry, it has been very useful.
Cheers,
Bill
-----Original Message-----
From: Price, Henry [mailto:[EMAIL PROTECTED]
Sent: 13 May 2004 17:39
To: Bill Martin; '[EMAIL PROTECTED]'
Subject: RE: [Nant-users] Interim state on a build between SUCCEEDED and FAILEDApologies if this is a repeat...The parent property problem is resolvable if you define the property in the parent script (probably as <property name="testresult.string" value=""/> or something). You can then reset it in nested scripts (I assume that's what you're talking about when you say a controlling project? A script that calls others?). Even better, just pick them all up from a separate config file from your main script using:<include buildfile="build.config"/>If you're not already doing something like that. Without just copying in my scripts, I'll try and outline what I'm trying to explain (badly :) as a solution to your original problem). This is not even attempting to be syntactically correct :)<target name="Main"><call target="Check_Option_Explicit" failonerror="false"/><call target="build_report"/><if propertytrue="fail.string"><fail>.</fail></if></target><target name="build_report"><script>Build resulted in this many option explicit problems (this script checks for all the conditions using the OptionExplicit.Results property etc)It then sets fail.string accordingly.It can also echo some nice looking results to the command line etc etc.<script></target><target name="Check_Option_Explicit"><!-- sets this property from script using Project.properties["OptionExplicit.Results"]--></target>You see that you could call many targets like Check_Option_Explicit and create many properties (in your case propertyexists may not be the best way to do this)I've grossly oversimplified this, so I apologise in advance - I'm just trying to get the general idea across as we use it quite successfully :) As for the fork stuff - I've done similar, but had to write my own spawn task to do so - which I use a lot in case you're wondering : )
"This communication is intended solely for the addressee and is confidential and not for third party unauthorised distribution."
______________________________________________________________
CONFIDENTIALITY NOTICE
This communication and the information it contains is intended for the person or organisation to
whom it is addressed. Its contents are confidential and may be protected in law. Unauthorised use,
copying or disclosure of any of it may be unlawful. If you are not the intended recipient, please
contact us immediately.
The contents of any attachments in this e-mail may contain software viruses, which could damage your
own computer system. While Marlborough Stirling has taken every reasonable precaution to minimise
this risk, we cannot accept liability for any damage, which you sustain as a result of software
viruses. You should carry out your own virus checking procedure before opening any attachment.
Marlborough Stirling plc, Registered in England and Wales
Registered No. 3008820,
Allen Jones House, Jessop Avenue, Cheltenham, Gloucestershire, GL50 3SH
Tel: 01242 547000 Fax: 01242 547100
http://www.marlborough-stirling.com
