Your project conf should look like this:

<project>
<triggers>...</triggers>
<sourcecontrol>...</sourcecontrol>
<tasks>
     <!-- Here are all your tasks -->
</tasks>
<publishers>...</publishers>
</project>

The conditional tasks is a task so it must be in the tasks section.
Thus your tasks section should look like this :

<tasks>
  <!-- Task to be executed BEFORE the conditional task -->
  <conditional>
    <conditions>
      <lastStatusCondition>
        <value>Failure</value>
      </lastStatusCondition>
    </conditions>
    <tasks>
      <!-- Tasks to perform if condition passed -->
    </tasks>
    <elseTasks>
      <!-- Tasks to perform if condition failed -->
    </elseTasks>
   </conditional>
  <!-- Task to be executed AFTER the conditional task -->
</tasks>

Hope this helps,
Benjamin

2011/3/31 Zilla <[email protected]>:
> How would I add tasks that are NOT dependent on the <conditional>
> block? Like this?
>
> <conditional>
>  <conditions>
>    <lastStatusCondition>
>      <value>Failure</value>
>    </lastStatusCondition>
>  </conditions>
>  <tasks>
>    <!-- Tasks to perform if condition passed -->
>  </tasks>
>  <elseTasks>
>    <!-- Tasks to perform if condition failed -->
>  </elseTasks>
> </conditional>
> <tasks>
>   <!-- Task blocks -->
> </tasks>
>
> On Mar 31, 3:48 am, Benjamin Baumann <[email protected]> wrote:
>> You have to put a task section after your conditions section but
>> before the end of the conditional section like in the example present
>> in the doc 
>> (http://confluence.public.thoughtworks.org/display/CCNET/Last+Build+St...
>> )
>> <conditional>
>>   <conditions>
>>     <lastStatusCondition>
>>       <value>Failure</value>
>>     </lastStatusCondition>
>>   </conditions>
>>   <tasks>
>>     <!-- Tasks to perform if condition passed -->
>>   </tasks>
>>   <elseTasks>
>>     <!-- Tasks to perform if condition failed -->
>>   </elseTasks>
>> </conditional>
>>
>> The conditional taks is a wrapper task.
>>
>> 2011/3/31 Zilla <[email protected]>:
>>
>> > Ok I googled and someone mentioned that this has to be inside a
>> > <tasks> block, and once I put it in there the error disappeared.
>> > However, another question. Which tasks will be conditionally
>> > performed, the ones "after" the <conditional> block?
>>
>> > -chris
>>
>> > On Mar 30, 4:24 pm, Zilla <[email protected]> wrote:
>> >> I'm following the syntax and example 
>> >> here:http://confluence.public.thoughtworks.org/display/CCNET/Last+Build+St...
>>
>> >>         <conditional>
>> >>                 <conditions>
>> >>                         <lastStatusCondition>
>> >>                                 <value>Success</value>
>> >>                         </lastStatusCondition>
>> >>                 </conditions>
>> >>         </conditional
>>
>> >> But CCValidate gives me an "Unused node detected" error. What gives?
>>
>> >> Thanks, chris

Reply via email to