To further explain, here's how I call my evaluate and call my <fail> target

                <target name="set_nant_failure">
                                <call target="fail" if="${(not project1_ok) or 
{not project2_ok)}" />
                </target>

The project1_ok and project2_ok are bools that are set CORRECTLY by evaluating 
resultproperty values earlier in script.

From: Chris Fouts [mailto:chris.fo...@caemilusa.com]
Sent: Monday, March 19, 2012 5:50 PM
To: nant-users@lists.sourceforge.net
Subject: Re: [NAnt-users] Nant property passed to CC.NET for pass/fail 
condition?

I thought I had this figured out.

I see that I'm calling my <fail> task in my Nant script. I see it in my ccnet 
console

fail:

     [echo] ******** BUILD FAILED! ******

BUILD SUCCEEDED - 1 non-fatal error(s), 2 warning(s)

Total time: 25.8 seconds.

But how come ccnet still says "BUILD SUCCEEDED"?

-chris



From: Chris Fouts [mailto:chris.fo...@caemilusa.com]
Sent: Wednesday, February 29, 2012 3:15 PM
To: nant-users@lists.sourceforge.net
Subject: Re: [NAnt-users] Nant property passed to CC.NET for pass/fail 
condition?

Thanks Adam and Bob.

From: Adam Bruss [mailto:abr...@awrcorp.com]
Sent: Wednesday, February 29, 2012 1:45 PM
To: nant-users@lists.sourceforge.net
Subject: Re: [NAnt-users] Nant property passed to CC.NET for pass/fail 
condition?

Nant has an if task that can check the values of properties. Then you can use 
the <fail> task to fail the build if a property matches some value. Use 
resultproperty of the exec task to get the return value of your build.

if: http://nant.sourceforge.net/release/0.85/help/tasks/if.html

fail: http://nant.sourceforge.net/release/0.85/help/tasks/fail.html

Adam Bruss
Senior Development Engineer
AWR Corporation
11520 N. Port Washington Rd., Suite 201
Mequon, WI  53092  USA
P: 1.262.240.0291 x104
F: 1.262.240.0294
E: abr...@awrcorp.com
W: http://www.awrcorp.com<http://www.awrcorp.com/>

From: Chris Fouts [mailto:chris.fo...@caemilusa.com]
Sent: Wednesday, February 29, 2012 11:05 AM
To: nant-users@lists.sourceforge.net
Subject: Re: [NAnt-users] Nant property passed to CC.NET for pass/fail 
condition?

I build TWO projects in one nant.build project file, say project1 and project2, 
that share a LOT of common files; hence, for NOW, I want to keep it this way.

I do this

Set properties project1_ok=false and project2_ok=false

Build project1 and project2 shared files
If project1 and project2 shared files fail
   Stop the build and report failure

Continue building project1-specific files
If project1-specific files build
   project1_ok=true

Continue building project2-specific files
If project2-specific files build
   Project2_ok=true

nant_pass_fail_property = project1_ok AND project2_ok

So if either project1_ok or project2_ok is false, I want ccnet to report a 
failure.

Make sense?

-chris




From: Bob Archer 
[mailto:bob.arc...@amsi.com]<mailto:[mailto:bob.arc...@amsi.com]>
Sent: Wednesday, February 29, 2012 11:51 AM
To: Chris Fouts; 
nant-users@lists.sourceforge.net<mailto:nant-users@lists.sourceforge.net>
Subject: RE: Nant property passed to CC.NET for pass/fail condition?

I expect it is the return value sent from nant.exe and that you can't modify 
it. What are you trying to do?

BOb


From: Chris Fouts 
[mailto:chris.fo...@caemilusa.com]<mailto:[mailto:chris.fo...@caemilusa.com]>
Sent: Wednesday, February 29, 2012 11:40 AM
To: nant-users@lists.sourceforge.net<mailto:nant-users@lists.sourceforge.net>
Subject: [NAnt-users] Nant property passed to CC.NET for pass/fail condition?

What is the nant property that is set for CC.NET to report a pass/fail 
condition? I assume I can modify this property? Is it nant.onfailure? Thanks!

-chris



***This e-mail message is intended only for the above named recipient(s)
and may contain information that is sensitive or proprietary. If you have
received this message in error or are not the named recipient(s), please
immediately notify the sender, delete this e-mail message without making
a copy and do not disclose or relay this e-mail message to anyone.***
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to