Scripts are inherently single threaded on Windows boxes
which is why when you spawn multiple JVM threads on a Windows box
requesting a Resource such as
-Delete Directory
-Create Directory
-Any other IO
with a forked JVM nothing physically happens until the forked JVM returns
In fact i I forked a VM in my old Ant Scripts I would have to put a timer in to wait to see if the action had in fact completed ..


My Rule:
If you are absolutely need to manipulate a resource dont fork a thread
Otherwise ok

If you need more granularity look at the task Java for big brother at
http://ant.apache.org/manual/CoreTasks/java.html

Regards,

Martin





From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
Subject: RE: [Nant-users] Interim state on a build between SUCCEEDED and FAILED
Date: Thu, 13 May 2004 16:56:03 +0100
MIME-Version: 1.0
X-Originating-IP: [62.189.230.188]
Received: from mc3-f39.hotmail.com ([64.4.50.175]) by mc3-s17.hotmail.com with Microsoft SMTPSVC(5.0.2195.6824); Thu, 13 May 2004 09:01:24 -0700
Received: from sc8-sf-list2.sourceforge.net ([66.35.250.206]) by mc3-f39.hotmail.com with Microsoft SMTPSVC(5.0.2195.6824); Thu, 13 May 2004 08:58:19 -0700
Received: from localhost ([127.0.0.1] helo=projects.sourceforge.net)by sc8-sf-list2.sourceforge.net with esmtp (Exim 4.30)id 1BOIaw-0004AO-Nu; Thu, 13 May 2004 08:58:02 -0700
Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.11] helo=sc8-sf-mx1.sourceforge.net)by sc8-sf-list2.sourceforge.net with esmtp (Exim 4.30)id 1BOIaH-0003x4-DOfor [EMAIL PROTECTED]; Thu, 13 May 2004 08:57:21 -0700
Received: from mail1.messagelabs.com ([212.125.75.4])by sc8-sf-mx1.sourceforge.net with smtp (Exim 4.30)id 1BOIaG-0004xQ-Dmfor [EMAIL PROTECTED]; Thu, 13 May 2004 08:57:20 -0700
Received: (qmail 14613 invoked from network); 13 May 2004 15:57:15 -0000
Received: from unknown (HELO SCH007846.msg.local) (62.189.230.188) by server-4.tower-1.messagelabs.com with SMTP; 13 May 2004 15:57:15 -0000
Received: from MSGCHEX2K.msg.local (unverified) by SCH007846.msg.local (Content Technologies SMTPRS 4.3.12) with ESMTP id <[EMAIL PROTECTED]> for <[EMAIL PROTECTED]>; Thu, 13 May 2004 16:58:07 +0100
Received: from MSGHSEX2K.msg.local ([5.160.50.2]) by MSGCHEX2K.msg.local with Microsoft SMTPSVC (5.0.2195.6713); Thu, 13 May 2004 16:56:50 +0100
X-Message-Info: pdGgd64CkwYBecCeulYyOfHTPZ3a8BUKorNVN2keLjc=
X-VirusChecked: Checked
X-Env-Sender: [EMAIL PROTECTED]
X-Msg-Ref: server-4.tower-1.messagelabs.com!1084463835!12457220
X-StarScan-Version: 5.2.11; banners=-,-,-
content-class: urn:content-classes:message
X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0
Message-ID: <[EMAIL PROTECTED]>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
Thread-Topic: [Nant-users] Interim state on a build between SUCCEEDED and FAILED
Thread-Index: AcQ4/QVscr6Z8XUbQsmz8QK8V9CkgwAA++tg
X-OriginalArrivalTime: 13 May 2004 15:56:50.0910 (UTC) FILETIME=[E77467E0:01C43902]
X-Spam-Score: 0.5 (/)
X-Spam-Report: Spam Filtering performed by sourceforge.net.See http://spamassassin.org/tag/ for more details.Report problems to http://sf.net/tracker/?func=add&group_id=1&atid=2000010.3 NO_REAL_NAME From: does not include a real name0.1 HTML_FONTCOLOR_BLUE BODY: HTML font color is blue0.0 HTML_MESSAGE BODY: HTML included in message0.0 LINES_OF_YELLING BODY: A WHOLE LINE OF YELLING DETECTED0.1 LINES_OF_YELLING_2 BODY: 2 WHOLE LINES OF YELLING DETECTED
Errors-To: [EMAIL PROTECTED]
X-BeenThere: [EMAIL PROTECTED]
X-Mailman-Version: 2.0.9-sf.net
Precedence: bulk
List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/nant-users>,<mailto:[EMAIL PROTECTED]>
List-Id: Discussion of NAnt features and usage <nant-users.lists.sourceforge.net>
List-Post: <mailto:[EMAIL PROTECTED]>
List-Help: <mailto:[EMAIL PROTECTED]>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/nant-users>,<mailto:[EMAIL PROTECTED]>
List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum=nant-users>
Return-Path: [EMAIL PROTECTED]


Thanks for that Henry,

It's not quite what I want to do, but it has given me a couple of ideas.
Your idea of defining a property is good, I can do this inside my task and
add or modify the property on the project then access it from the build
script at the end to print the message. The only problem is that I have a
controlling project that runs the projects for each individual component to
be built, and the property only gets set on the nested project. This
doesn't appear to have a parent property on the project class. Does it have
any concept of a parent in code? If so, does anyone know how to access it?


The second approach that occured to me would be to use a similar approach
but store the errors in a static member in my task and then have an optional
attribute to the task that triggered a dump of the contents. Does anyone
know if the <nant> task within nant creates a new process or do all
instances run in the same process? I know in Ant you could specify "fork"
which would run the nested Ant instance in a new instance of the JVM. If
so, that would preclude using static data, but if they all run in the same
process then I could get away with it.


Cheers,

Bill


-----Original Message----- From: Price, Henry [mailto:[EMAIL PROTECTED] Sent: 13 May 2004 16:14 To: Bill Martin; [EMAIL PROTECTED] Subject: RE: [Nant-users] Interim state on a build between SUCCEEDED and FAILED



I've worked around a similar problem which relates to the success of Nunit
tests (amongst other things) based on external sources. We have no control
over them, so they are prone to fail which would normally cause the build to
fail entirely. In this case, we may be aware that the external sources are
down, but still want the build to run (entirely) without just failing.


Without going into huge detail, the way I do most of it is with a
combination of the <exec> task (to run the Nunit tests - gives a bit more
control than the Nant task) and several generous chunks of C# script. The
tests are run and output XML, some C# script then runs against that XML
looking for failures and stores the result in a Nant property. The <exec>
task has failonerror="false" so the build will continue regardless of
failures.

As the last task in the build, it looks at a number of such properties (this
can be applied to template checking, Ndoc generation, FXCop etc) and then I
have another little piece of C# script which then writes a summary report
(something like 'Build Succeeded, but the following external tests failed
... There were the following warnings...' etc. You can also use a
conditional <fail> task to fail things deliberately at the end if you decide
it's all gone too wrong.


This is fine for a non-release candidate, the scripts also check for this,
and are a lot more rigid in what passes and gets versioned and packaged for
release.

Sorry if that's a bit vague - hope it helps :)





______________________________________________________________

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


_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar � get it now! http://toolbar.msn.com/go/onm00200415ave/direct/01/




-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to