You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Siamack Farshi <sf...@724.com> on 2002/04/24 15:17:11 UTC

some help

> Hello Everyone:
>  I have a master build which calls the build.xml of all the subprojects.
> The
> build.xml of subprojects only compiles the java files. However, in my
> master
> build if one of the subprojects fails to compile the build is terminated.
> 
> Is there a way that I can keep the build going even if some of the
> subprojects
> fail.
> 
> Here is my target within my masterbuild:
> 
>    <target name="all" depends="update"> 
> 	<ant antfile="build.xml" dir="SessionManagement" target="all"/> 
> 	<ant antfile="build.xml" dir="DeviceProfileService" target="all"/>
> 	<ant antfile="build.xml" dir="DeviceAdapterFramework" target="all"/>
> 	<ant antfile="build.xml" dir="DeviceAdapterDispatcher"
> target="all"/>
> 	<ant antfile="build.xml" dir="HtmlDeviceAdapter" target="all"/>
> 	<ant antfile="build.xml" dir="WmlDeviceAdapter" target="all"/>
> 	<ant antfile="build.xml" dir="PaginationAggregation" target="all"/>
> 	<ant antfile="build.xml" dir="ImageManagement" target="all"/>
> 	<ant antfile="build.xml" dir="SampleApplications" target="all"/>
> 	<ant antfile="build.xml" dir="UserInterface" target="all"/>
> 	<ant antfile="build.xml" dir="HdmlDeviceAdapter" target="all"/>
> 	<ant antfile="build.xml" dir="Logging" target="all"/>
>   </target> 
> 
> For example if SessionManagement fails, build is terminated.
> 
> I would appreciate all your replies in advacne,
> regards.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: some help

Posted by stephan beal <st...@wanderinghorse.net>.
On Wednesday 24 April 2002 15:17, Siamack Farshi wrote:
> > Is there a way that I can keep the build going even if some of the
> > subprojects
> > fail.
> >
> > Here is my target within my masterbuild:
> >
> >    <target name="all" depends="update">
...
> >   </target>

Many tasks have a 'failonerror' flag just for this case. For tasks which 
don't, one option is to grab the TryCatch task from:

  http://sourceforge.net/projects/ant-contrib

and wrap each call in:
<try>...</try>
<catch><echo>Damn... continuing...</echo></catch>

The copy of TryTask in their source tree always NPEs under Ant 1.4.1, but 
there's a patch for that in the patches section of the above site.

----- stephan
stephan@einsurance.de - http://www.einsurance.de
Office: +49 (89)  552 92 862 Handy:  +49 (179) 211 97 67
"I didn't give in to the Nazis and I won't give in to the bladder." 
- The Queen Mum


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>