ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David.Bai...@lawson.com
Subject Re: Continue after a failing ant task
Date Tue, 22 Jan 2002 17:04:52 GMT


We use a solution which gets around most of the build problems we
encounter.
The <javac> and <jar> tasks support 'failonerror' and 'whenempty'
attributes,
respectively.  Our build files make use of there attributes and set them to
the
values of the properties 'FAIL' and 'EMPTYJAR', respectively.  That is,
something
like

     <javac srcdir="${SRCDIR}"
          destdir="${CLASSDIR}"
          ...
          failonerror="${FAIL}" />

     <jar jarfile="${JARDIR}/jarfile.jar"
          ...
          whenempty="${EMPTYJAR}" />

I've modified the wrapper script for ant to accept a '-i' command line
parameter, and
to set the 'FAIL' and 'EMPTYJAR' properties appropriately when it's passed.
That is,
if the user passes the '-i' option to the ant build script, then the
command invoking ant
would read something like:

     java org.apache.tools.ant.Main -DFAIL=no -DEMPTYJAR=skip . . . .

This won't allow you to ignore 100% of build errors, but it probably does
ignore 90%
or more of them.

--dave



                                                                                         
                    
                    "Markus                                                              
                    
                    Kohler"              To:     "'Ant Users List'" <ant-user@jakarta.apache.org>
            
                    <kohler@cms.te       cc:                                          
                       
                    cmath.de>            Subject:     Continue after a failing ant task
                      
                                                                                         
                    
                    01/22/2002                                                           
                    
                    11:00 AM                                                             
                    
                    Please respond                                                       
                    
                    to "Ant Users                                                        
                    
                    List"                                                                
                    
                                                                                         
                    
                                                                                         
                    




 Hi,
For nightly builds I use the "ant" task from within one central build file
to
execute the build scripts for all my projects.
The problem is that after one build for a projects fails the whole
build fails. Since I have many projects I want to continue the build.

I've searched the documentation and the mailing list archives, but couldn't
find any solution for this problem.



Regards,
Markus
(See attached file: winmail.dat)--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message