ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Reilly <peter.rei...@corvil.com>
Subject Re: new task 'ants' required or not.
Date Mon, 22 Dec 2003 16:25:47 GMT
Sathyanarayana V. wrote:

>Probelm with 'subant' is: it doesnt communicate/contribute to overall build status. subprojects
may fail, but  the overall process will be successful. Wouldnt it contribute in over all build
status.
>  
>
This is now quite true,
If a subproject fails, subant will fail also.

With the -keep-going or -k option to ant,
if the subproject fails, subant will run the rest of the subprojects, 
but the overall build will still fail:

  <target name="badgood">
    <subant>
      <fileset dir=".">
        <include name="bad.xml"/>
        <include name="good.xml"/>
      </fileset>
    </subant>
  </target>


Generates:

Buildfile: subant.xml
badgood:
   [subant] File '/home/preilly/learning/ant/bad.xml' failed with message 'Following error
occured while executing this line
   [subant] /home/preilly/learning/ant/bad.xml:2: The content of elements must consist of
well-formed character data or markup.'.
good:
     [echo] Good

Target 'badgood' failed with message 'Following error occured while executing this line

/home/preilly/learning/ant/bad.xml:2: The content of elements must consist of well-formed
character data or markup.'.


BUILD FAILED
/home/preilly/learning/ant/subant.xml:8: Following error occured while 
executing this line
/home/preilly/learning/ant/bad.xml:2: The content of elements must 
consist of well-formed character data or markup.

Peter

>Thanks,
>Sathya
>
>
>
>
>-----Original Message-----
>From: Peter Reilly [mailto:peter.reilly@corvil.com]
>Sent: Monday, December 22, 2003 2:53 PM
>To: Ant Developers List
>Subject: Re: new task 'ants' required or not.
>
>
>Steve Loughran wrote:
>
>  
>
>>Sathyanarayana V. wrote:
>>
>>    
>>
>>>Hi All,
>>>
>>>    Recently,  as part of automating my project builds, I have used 
>>>CruiseControl along with Ant.  Surprisingly, I didn't find any task 
>>>to build/compile all the subprojects    of a project.  My purpose was 
>>>to have  the compile time errors of all the subprojects as part of 
>>>automated build report. The 'ant' task will stop building as soon as 
>>>one subproject fails. I tried using java/exec tasks with 'failonerror 
>>>'  attribute as false, but the problem with  this approach is that 
>>>build status of subprojects is not available to the main build 
>>>process and resulting Total build successful though subprojects are 
>>>failing in-between.
>>>      
>>>
>>OK
>>
>>    
>>
>>>   So, I have written new task  called 'ants' and used for my 
>>>automated builds. This task internally uses 'ant' only.  What I would 
>>>like to know is: Can I post this task of mine to apache or Is there 
>>>any existing task/workaround available for the above required behavior.
>>>      
>>>
>>Ant 1.6 has '<subant> that wil bulk compile a project ... does this do 
>>what you want or are there changes you'd recommend?
>>    
>>
>
>Also ant 1.6 has a -keep-going which will continue exectuting targets 
>that do not rely on the task that failed.
>Peter
>
>  
>
>>>Thanks in advance
>>>Sathya
>>>
>>>
>>>      
>>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
>>For additional commands, e-mail: dev-help@ant.apache.org
>>
>>
>>
>>    
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
>For additional commands, e-mail: dev-help@ant.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
>For additional commands, e-mail: dev-help@ant.apache.org
>
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message